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
92e087c4
Unverified
Commit
92e087c4
authored
Apr 16, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 16, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #75989 from neolit123/remove-aggregator-from-e2e-fw
[e2e] decouple the aggregated clientset from the e2e testing framework
parents
a81a8b65
760a825f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
+15
-11
aggregator.go
test/e2e/apimachinery/aggregator.go
+14
-5
BUILD
test/e2e/framework/BUILD
+0
-1
framework.go
test/e2e/framework/framework.go
+1
-5
No files found.
test/e2e/apimachinery/aggregator.go
View file @
92e087c4
...
...
@@ -25,7 +25,7 @@ import (
"time"
apps
"k8s.io/api/apps/v1"
"k8s.io/api/core/v1"
v1
"k8s.io/api/core/v1"
rbacv1beta1
"k8s.io/api/rbac/v1beta1"
apierrs
"k8s.io/apimachinery/pkg/api/errors"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
...
...
@@ -74,7 +74,17 @@ var _ = SIGDescribe("Aggregator", func() {
ginkgo
.
BeforeEach
(
func
()
{
c
=
f
.
ClientSet
ns
=
f
.
Namespace
.
Name
aggrclient
=
f
.
AggregatorClient
if
aggrclient
==
nil
{
config
,
err
:=
framework
.
LoadConfig
()
if
err
!=
nil
{
framework
.
Failf
(
"could not load config: %v"
,
err
)
}
aggrclient
,
err
=
aggregatorclient
.
NewForConfig
(
config
)
if
err
!=
nil
{
framework
.
Failf
(
"could not create aggregator client: %v"
,
err
)
}
}
})
/*
...
...
@@ -84,7 +94,7 @@ var _ = SIGDescribe("Aggregator", func() {
*/
framework
.
ConformanceIt
(
"Should be able to support the 1.10 Sample API Server using the current Aggregator"
,
func
()
{
// Testing a 1.10 version of the sample-apiserver
TestSampleAPIServer
(
f
,
imageutils
.
GetE2EImage
(
imageutils
.
APIServer
))
TestSampleAPIServer
(
f
,
aggrclient
,
imageutils
.
GetE2EImage
(
imageutils
.
APIServer
))
})
})
...
...
@@ -104,11 +114,10 @@ func cleanTest(client clientset.Interface, aggrclient *aggregatorclient.Clientse
// TestSampleAPIServer is a basic test if the sample-apiserver code from 1.10 and compiled against 1.10
// will work on the current Aggregator/API-Server.
func
TestSampleAPIServer
(
f
*
framework
.
Framework
,
image
string
)
{
func
TestSampleAPIServer
(
f
*
framework
.
Framework
,
aggrclient
*
aggregatorclient
.
Clientset
,
image
string
)
{
ginkgo
.
By
(
"Registering the sample API server."
)
client
:=
f
.
ClientSet
restClient
:=
client
.
Discovery
()
.
RESTClient
()
aggrclient
:=
f
.
AggregatorClient
namespace
:=
f
.
Namespace
.
Name
context
:=
setupServerCert
(
namespace
,
"sample-api"
)
...
...
test/e2e/framework/BUILD
View file @
92e087c4
...
...
@@ -116,7 +116,6 @@ go_library(
"//staging/src/k8s.io/client-go/tools/watch:go_default_library",
"//staging/src/k8s.io/client-go/util/retry:go_default_library",
"//staging/src/k8s.io/component-base/cli/flag:go_default_library",
"//staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset:go_default_library",
"//test/e2e/framework/ginkgowrapper:go_default_library",
"//test/e2e/framework/metrics:go_default_library",
"//test/e2e/framework/testfiles:go_default_library",
...
...
test/e2e/framework/framework.go
View file @
92e087c4
...
...
@@ -46,7 +46,6 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/restmapper"
scaleclient
"k8s.io/client-go/scale"
aggregatorclient
"k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset"
"k8s.io/kubernetes/test/e2e/framework/metrics"
testutils
"k8s.io/kubernetes/test/utils"
...
...
@@ -75,8 +74,7 @@ type Framework struct {
ClientSet
clientset
.
Interface
KubemarkExternalClusterClientSet
clientset
.
Interface
AggregatorClient
*
aggregatorclient
.
Clientset
DynamicClient
dynamic
.
Interface
DynamicClient
dynamic
.
Interface
ScalesGetter
scaleclient
.
ScalesGetter
...
...
@@ -182,8 +180,6 @@ func (f *Framework) BeforeEach() {
}
f
.
ClientSet
,
err
=
clientset
.
NewForConfig
(
config
)
ExpectNoError
(
err
)
f
.
AggregatorClient
,
err
=
aggregatorclient
.
NewForConfig
(
config
)
ExpectNoError
(
err
)
f
.
DynamicClient
,
err
=
dynamic
.
NewForConfig
(
config
)
ExpectNoError
(
err
)
// node.k8s.io is based on CRD, which is served only as JSON
...
...
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