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
fd76e6a0
Commit
fd76e6a0
authored
Oct 12, 2016
by
Paul Morie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Framework.MatchContainerOutput able to use GenerateName
parent
53ec6e60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
util.go
test/e2e/framework/util.go
+4
-4
service_accounts.go
test/e2e/service_accounts.go
+1
-1
No files found.
test/e2e/framework/util.go
View file @
fd76e6a0
...
...
@@ -2145,15 +2145,15 @@ func (f *Framework) MatchContainerOutput(
podClient
:=
f
.
PodClient
()
ns
:=
f
.
Namespace
.
Name
podClient
.
Create
(
pod
)
createdPod
:=
podClient
.
Create
(
pod
)
// Wait for client pod to complete.
if
err
:=
WaitForPodSuccessInNamespace
(
f
.
Client
,
p
od
.
Name
,
ns
);
err
!=
nil
{
if
err
:=
WaitForPodSuccessInNamespace
(
f
.
Client
,
createdP
od
.
Name
,
ns
);
err
!=
nil
{
return
fmt
.
Errorf
(
"expected pod %q success: %v"
,
pod
.
Name
,
err
)
}
// Grab its logs. Get host first.
podStatus
,
err
:=
podClient
.
Get
(
p
od
.
Name
)
podStatus
,
err
:=
podClient
.
Get
(
createdP
od
.
Name
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to get pod status: %v"
,
err
)
}
...
...
@@ -2162,7 +2162,7 @@ func (f *Framework) MatchContainerOutput(
podStatus
.
Spec
.
NodeName
,
podStatus
.
Name
,
containerName
,
err
)
// Sometimes the actual containers take a second to get started, try to get logs for 60s
logs
,
err
:=
GetPodLogs
(
f
.
Client
,
ns
,
pod
.
Name
,
containerName
)
logs
,
err
:=
GetPodLogs
(
f
.
Client
,
ns
,
pod
Status
.
Name
,
containerName
)
if
err
!=
nil
{
Logf
(
"Failed to get logs from node %q pod %q container %q. %v"
,
podStatus
.
Spec
.
NodeName
,
podStatus
.
Name
,
containerName
,
err
)
...
...
test/e2e/service_accounts.go
View file @
fd76e6a0
...
...
@@ -191,7 +191,7 @@ var _ = framework.KubeDescribe("ServiceAccounts", func() {
pod
:=
&
api
.
Pod
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
"pod-service-account-"
+
string
(
uuid
.
NewUUID
())
,
GenerateName
:
"pod-service-account-"
+
string
(
uuid
.
NewUUID
())
+
"-"
,
},
Spec
:
api
.
PodSpec
{
Containers
:
[]
api
.
Container
{
...
...
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