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
add264a6
Commit
add264a6
authored
Jan 25, 2017
by
shashidharatd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix federation component logging when e2e test case fails
parent
e46169f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
framework.go
test/e2e_federation/framework/framework.go
+17
-3
No files found.
test/e2e_federation/framework/framework.go
View file @
add264a6
...
@@ -25,7 +25,9 @@ import (
...
@@ -25,7 +25,9 @@ import (
apierrors
"k8s.io/apimachinery/pkg/api/errors"
apierrors
"k8s.io/apimachinery/pkg/api/errors"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apimachinery/pkg/util/wait"
fedv1beta1
"k8s.io/kubernetes/federation/apis/federation/v1beta1"
"k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset"
"k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework"
...
@@ -43,10 +45,22 @@ type Framework struct {
...
@@ -43,10 +45,22 @@ type Framework struct {
}
}
func
NewDefaultFederatedFramework
(
baseName
string
)
*
Framework
{
func
NewDefaultFederatedFramework
(
baseName
string
)
*
Framework
{
f
:=
&
Framework
{
framework
.
NewDefaultFramework
(
baseName
),
nil
,
&
v1
.
Namespace
{}}
options
:=
framework
.
FrameworkOptions
{
ClientQPS
:
20
,
ClientBurst
:
50
,
}
f
:=
&
Framework
{
&
framework
.
Framework
{
BaseName
:
baseName
,
AddonResourceConstraints
:
make
(
map
[
string
]
framework
.
ResourceConstraint
),
Options
:
options
,
ClientSet
:
nil
,
},
nil
,
&
v1
.
Namespace
{}}
BeforeEach
(
f
.
BeforeEach
)
BeforeEach
(
f
.
FederationBeforeEach
)
BeforeEach
(
f
.
FederationBeforeEach
)
AfterEach
(
f
.
FederationAfterEach
)
AfterEach
(
f
.
FederationAfterEach
)
AfterEach
(
f
.
AfterEach
)
return
f
return
f
}
}
...
@@ -138,9 +152,9 @@ func (f *Framework) FederationAfterEach() {
...
@@ -138,9 +152,9 @@ func (f *Framework) FederationAfterEach() {
return
f
.
FederationClientset
.
Core
()
.
Events
(
ns
)
.
List
(
opts
)
return
f
.
FederationClientset
.
Core
()
.
Events
(
ns
)
.
List
(
opts
)
},
f
.
FederationNamespace
.
Name
)
},
f
.
FederationNamespace
.
Name
)
// Print logs of federation control plane pods (federation-apiserver and federation-controller-manager)
// Print logs of federation control plane pods (federation-apiserver and federation-controller-manager)
framework
.
LogPodsWithLabels
(
f
.
ClientSet
,
"federation"
,
map
[
string
]
string
{
"app"
:
"federated-cluster"
},
framework
.
Logf
)
framework
.
LogPodsWithLabels
(
f
.
ClientSet
,
fedv1beta1
.
FederationNamespaceSystem
,
map
[
string
]
string
{
"app"
:
"federated-cluster"
},
framework
.
Logf
)
// Print logs of kube-dns pod
// Print logs of kube-dns pod
framework
.
LogPodsWithLabels
(
f
.
ClientSet
,
"kube-system"
,
map
[
string
]
string
{
"k8s-app"
:
"kube-dns"
},
framework
.
Logf
)
framework
.
LogPodsWithLabels
(
f
.
ClientSet
,
api
.
NamespaceSystem
,
map
[
string
]
string
{
"k8s-app"
:
"kube-dns"
},
framework
.
Logf
)
}
}
}
}
...
...
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