Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
1cdd34b7
Commit
1cdd34b7
authored
Jul 07, 2015
by
Yu-Ju Hong
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10880 from saad-ali/issue7840
Fix "Docker Containers should be able to override the image's default command" tests
parents
84a8c5f7
e89f3375
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
util.go
test/e2e/util.go
+9
-5
No files found.
test/e2e/util.go
View file @
1cdd34b7
...
@@ -895,6 +895,7 @@ func testContainerOutputInNamespace(scenarioName string, c *client.Client, pod *
...
@@ -895,6 +895,7 @@ func testContainerOutputInNamespace(scenarioName string, c *client.Client, pod *
// Sometimes the actual containers take a second to get started, try to get logs for 60s
// Sometimes the actual containers take a second to get started, try to get logs for 60s
for
time
.
Now
()
.
Sub
(
start
)
<
(
60
*
time
.
Second
)
{
for
time
.
Now
()
.
Sub
(
start
)
<
(
60
*
time
.
Second
)
{
err
=
nil
logs
,
err
=
c
.
Get
()
.
logs
,
err
=
c
.
Get
()
.
Prefix
(
"proxy"
)
.
Prefix
(
"proxy"
)
.
Resource
(
"nodes"
)
.
Resource
(
"nodes"
)
.
...
@@ -902,14 +903,17 @@ func testContainerOutputInNamespace(scenarioName string, c *client.Client, pod *
...
@@ -902,14 +903,17 @@ func testContainerOutputInNamespace(scenarioName string, c *client.Client, pod *
Suffix
(
"containerLogs"
,
ns
,
podStatus
.
Name
,
containerName
)
.
Suffix
(
"containerLogs"
,
ns
,
podStatus
.
Name
,
containerName
)
.
Do
()
.
Do
()
.
Raw
()
Raw
()
fmt
.
Sprintf
(
"pod logs:%v
\n
"
,
string
(
logs
))
if
err
==
nil
&&
strings
.
Contains
(
string
(
logs
),
"Internal Error"
)
{
By
(
fmt
.
Sprintf
(
"pod logs:%v
\n
"
,
string
(
logs
)))
err
=
fmt
.
Errorf
(
"Fetched log contains
\"
Internal Error
\"
: %q."
,
string
(
logs
))
if
strings
.
Contains
(
string
(
logs
),
"Internal Error"
)
{
}
By
(
fmt
.
Sprintf
(
"Failed to get logs from node %q pod %q container %q: %v"
,
if
err
!=
nil
{
podStatus
.
Spec
.
NodeName
,
podStatus
.
Name
,
containerName
,
string
(
logs
)))
By
(
fmt
.
Sprintf
(
"Warning: Failed to get logs from node %q pod %q container %q. %v"
,
podStatus
.
Spec
.
NodeName
,
podStatus
.
Name
,
containerName
,
err
))
time
.
Sleep
(
5
*
time
.
Second
)
time
.
Sleep
(
5
*
time
.
Second
)
continue
continue
}
}
By
(
fmt
.
Sprintf
(
"Succesfully fetched pod logs:%v
\n
"
,
string
(
logs
)))
break
break
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment