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
08f17fef
Commit
08f17fef
authored
Jun 23, 2016
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify DeleteAllEtcdKeys in integration tests.
parent
37edcc82
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
89 additions
and
35 deletions
+89
-35
auth_test.go
test/integration/auth_test.go
+11
-1
client_test.go
test/integration/client_test.go
+25
-9
configmap_test.go
test/integration/configmap_test.go
+3
-1
dynamic_client_test.go
test/integration/dynamic_client_test.go
+3
-1
extender_test.go
test/integration/extender_test.go
+1
-0
etcd_utils.go
test/integration/framework/etcd_utils.go
+0
-1
garbage_collector_test.go
test/integration/garbage_collector_test.go
+3
-1
master_test.go
test/integration/master_test.go
+3
-1
persistent_volumes_test.go
test/integration/persistent_volumes_test.go
+27
-16
pods_test.go
test/integration/pods_test.go
+6
-2
quota_test.go
test/integration/quota_test.go
+1
-0
rbac_test.go
test/integration/rbac_test.go
+1
-0
scheduler_test.go
test/integration/scheduler_test.go
+2
-0
secret_test.go
test/integration/secret_test.go
+3
-1
service_account_test.go
test/integration/service_account_test.go
+0
-1
No files found.
test/integration/auth_test.go
View file @
08f17fef
...
...
@@ -412,6 +412,7 @@ func getTestRequests() []struct {
//
// TODO(etune): write a fuzz test of the REST API.
func
TestAuthModeAlwaysAllow
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
// Set up a master
...
...
@@ -517,6 +518,7 @@ func getPreviousResourceVersionKey(url, id string) string {
}
func
TestAuthModeAlwaysDeny
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
// Set up a master
...
...
@@ -571,7 +573,7 @@ func (allowAliceAuthorizer) Authorize(a authorizer.Attributes) error {
// TestAliceNotForbiddenOrUnauthorized tests a user who is known to
// the authentication system and authorized to do any actions.
func
TestAliceNotForbiddenOrUnauthorized
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
// This file has alice and bob in it.
...
...
@@ -652,6 +654,7 @@ func TestAliceNotForbiddenOrUnauthorized(t *testing.T) {
// the authentication system but not authorized to do any actions
// should receive "Forbidden".
func
TestBobIsForbidden
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
// This file has alice and bob in it.
...
...
@@ -701,6 +704,7 @@ func TestBobIsForbidden(t *testing.T) {
// An authorization module is installed in this scenario for integration
// test purposes, but requests aren't expected to reach it.
func
TestUnknownUserIsUnauthorized
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
// This file has alice and bob in it.
...
...
@@ -772,6 +776,7 @@ func (impersonateAuthorizer) Authorize(a authorizer.Attributes) error {
}
func
TestImpersonateIsForbidden
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
...
...
@@ -923,6 +928,7 @@ func (a *trackingAuthorizer) Authorize(attributes authorizer.Attributes) error {
// TestAuthorizationAttributeDetermination tests that authorization attributes are built correctly
func
TestAuthorizationAttributeDetermination
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
trackingAuthorizer
:=
&
trackingAuthorizer
{}
...
...
@@ -993,6 +999,7 @@ func TestAuthorizationAttributeDetermination(t *testing.T) {
// TestNamespaceAuthorization tests that authorization can be controlled
// by namespace.
func
TestNamespaceAuthorization
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
// This file has alice and bob in it.
...
...
@@ -1096,6 +1103,7 @@ func TestNamespaceAuthorization(t *testing.T) {
// TestKindAuthorization tests that authorization can be controlled
// by namespace.
func
TestKindAuthorization
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
// This file has alice and bob in it.
...
...
@@ -1189,6 +1197,7 @@ func TestKindAuthorization(t *testing.T) {
// TestReadOnlyAuthorization tests that authorization can be controlled
// by namespace.
func
TestReadOnlyAuthorization
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
// This file has alice and bob in it.
...
...
@@ -1253,6 +1262,7 @@ func TestReadOnlyAuthorization(t *testing.T) {
// authenticator to call out to a remote web server for authentication
// decisions.
func
TestWebhookTokenAuthenticator
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
...
...
test/integration/client_test.go
View file @
08f17fef
...
...
@@ -44,11 +44,13 @@ import (
)
func
TestClient
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
ns
:=
api
.
NamespaceDefault
framework
.
DeleteAllEtcdKeys
()
client
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
info
,
err
:=
client
.
Discovery
()
.
ServerVersion
()
...
...
@@ -114,10 +116,12 @@ func TestClient(t *testing.T) {
}
func
TestAtomicPut
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
c
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
rcBody
:=
api
.
ReplicationController
{
...
...
@@ -203,10 +207,12 @@ func TestAtomicPut(t *testing.T) {
}
func
TestPatch
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
c
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
name
:=
"patchpod"
...
...
@@ -309,10 +315,12 @@ func TestPatch(t *testing.T) {
}
func
TestPatchWithCreateOnUpdate
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
c
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
endpointTemplate
:=
&
api
.
Endpoints
{
...
...
@@ -415,10 +423,12 @@ func TestPatchWithCreateOnUpdate(t *testing.T) {
}
func
TestAPIVersions
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
c
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
clientVersion
:=
c
.
APIVersion
()
.
String
()
...
...
@@ -438,11 +448,13 @@ func TestAPIVersions(t *testing.T) {
}
func
TestSingleWatch
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
ns
:=
"blargh"
framework
.
DeleteAllEtcdKeys
()
client
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
mkEvent
:=
func
(
i
int
)
*
api
.
Event
{
...
...
@@ -518,11 +530,13 @@ func TestMultiWatch(t *testing.T) {
// Disable this test as long as it demonstrates a problem.
// TODO: Reenable this test when we get #6059 resolved.
return
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
const
watcherCount
=
50
rt
.
GOMAXPROCS
(
watcherCount
)
framework
.
DeleteAllEtcdKeys
()
defer
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
...
...
@@ -777,10 +791,12 @@ func runSelfLinkTestOnNamespace(t *testing.T, c *client.Client, namespace string
}
func
TestSelfLinkOnNamespace
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
c
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
runSelfLinkTestOnNamespace
(
t
,
c
,
api
.
NamespaceDefault
)
...
...
test/integration/configmap_test.go
View file @
08f17fef
...
...
@@ -35,6 +35,9 @@ import (
// TestConfigMap tests apiserver-side behavior of creation of ConfigMaps and pods that consume them.
func
TestConfigMap
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
m
.
Handler
.
ServeHTTP
(
w
,
req
)
...
...
@@ -47,7 +50,6 @@ func TestConfigMap(t *testing.T) {
t
.
Fatalf
(
"Error in bringing up the master: %v"
,
err
)
}
framework
.
DeleteAllEtcdKeys
()
client
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
DoTestConfigMap
(
t
,
client
)
...
...
test/integration/dynamic_client_test.go
View file @
08f17fef
...
...
@@ -34,10 +34,12 @@ import (
)
func
TestDynamicClient
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
gv
:=
testapi
.
Default
.
GroupVersion
()
config
:=
&
restclient
.
Config
{
Host
:
s
.
URL
,
...
...
test/integration/extender_test.go
View file @
08f17fef
...
...
@@ -186,6 +186,7 @@ func machine_3_Prioritizer(pod *api.Pod, nodes *api.NodeList) (*schedulerapi.Hos
}
func
TestSchedulerExtender
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
...
...
test/integration/framework/etcd_utils.go
View file @
08f17fef
...
...
@@ -79,5 +79,4 @@ func DeleteAllEtcdKeys() {
glog
.
Fatalf
(
"Unable delete key: %v"
,
err
)
}
}
}
test/integration/garbage_collector_test.go
View file @
08f17fef
...
...
@@ -117,6 +117,9 @@ func newOwnerRC(name string) *v1.ReplicationController {
}
func
setup
(
t
*
testing
.
T
)
(
*
garbagecollector
.
GarbageCollector
,
clientset
.
Interface
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
m
.
Handler
.
ServeHTTP
(
w
,
req
)
...
...
@@ -130,7 +133,6 @@ func setup(t *testing.T) (*garbagecollector.GarbageCollector, clientset.Interfac
t
.
Fatalf
(
"Error in bringing up the master: %v"
,
err
)
}
framework
.
DeleteAllEtcdKeys
()
clientSet
,
err
:=
clientset
.
NewForConfig
(
&
restclient
.
Config
{
Host
:
s
.
URL
})
if
err
!=
nil
{
t
.
Fatalf
(
"Error in create clientset: %v"
,
err
)
...
...
test/integration/master_test.go
View file @
08f17fef
...
...
@@ -392,6 +392,9 @@ func countEndpoints(eps *api.Endpoints) int {
}
func
TestMasterService
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
m
,
err
:=
master
.
New
(
framework
.
NewIntegrationTestMasterConfig
())
if
err
!=
nil
{
t
.
Fatalf
(
"Error in bringing up the master: %v"
,
err
)
...
...
@@ -401,7 +404,6 @@ func TestMasterService(t *testing.T) {
}))
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
client
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
err
=
wait
.
Poll
(
time
.
Second
,
time
.
Minute
,
func
()
(
bool
,
error
)
{
...
...
test/integration/persistent_volumes_test.go
View file @
08f17fef
...
...
@@ -104,11 +104,13 @@ func testSleep() {
}
func
TestPersistentVolumeRecycler
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
glog
.
V
(
2
)
.
Infof
(
"TestPersistentVolumeRecycler started"
)
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
testClient
,
ctrl
,
watchPV
,
watchPVC
:=
createClients
(
t
,
s
)
defer
watchPV
.
Stop
()
defer
watchPVC
.
Stop
()
...
...
@@ -152,11 +154,13 @@ func TestPersistentVolumeRecycler(t *testing.T) {
}
func
TestPersistentVolumeDeleter
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
glog
.
V
(
2
)
.
Infof
(
"TestPersistentVolumeDeleter started"
)
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
testClient
,
ctrl
,
watchPV
,
watchPVC
:=
createClients
(
t
,
s
)
defer
watchPV
.
Stop
()
defer
watchPVC
.
Stop
()
...
...
@@ -202,13 +206,15 @@ func TestPersistentVolumeDeleter(t *testing.T) {
}
func
TestPersistentVolumeBindRace
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
// Test a race binding many claims to a PV that is pre-bound to a specific
// PVC. Only this specific PVC should get bound.
glog
.
V
(
2
)
.
Infof
(
"TestPersistentVolumeBindRace started"
)
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
testClient
,
ctrl
,
watchPV
,
watchPVC
:=
createClients
(
t
,
s
)
defer
watchPV
.
Stop
()
defer
watchPVC
.
Stop
()
...
...
@@ -270,10 +276,12 @@ func TestPersistentVolumeBindRace(t *testing.T) {
// TestPersistentVolumeClaimLabelSelector test binding using label selectors
func
TestPersistentVolumeClaimLabelSelector
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
testClient
,
controller
,
watchPV
,
watchPVC
:=
createClients
(
t
,
s
)
defer
watchPV
.
Stop
()
defer
watchPVC
.
Stop
()
...
...
@@ -343,10 +351,12 @@ func TestPersistentVolumeClaimLabelSelector(t *testing.T) {
// TestPersistentVolumeClaimLabelSelectorMatchExpressions test binding using
// MatchExpressions label selectors
func
TestPersistentVolumeClaimLabelSelectorMatchExpressions
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
testClient
,
controller
,
watchPV
,
watchPVC
:=
createClients
(
t
,
s
)
defer
watchPV
.
Stop
()
defer
watchPVC
.
Stop
()
...
...
@@ -435,10 +445,12 @@ func TestPersistentVolumeClaimLabelSelectorMatchExpressions(t *testing.T) {
// TestPersistentVolumeMultiPVs tests binding of one PVC to 100 PVs with
// different size.
func
TestPersistentVolumeMultiPVs
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
testClient
,
controller
,
watchPV
,
watchPVC
:=
createClients
(
t
,
s
)
defer
watchPV
.
Stop
()
defer
watchPVC
.
Stop
()
...
...
@@ -512,17 +524,17 @@ func TestPersistentVolumeMultiPVs(t *testing.T) {
waitForAnyPersistentVolumePhase
(
watchPV
,
api
.
VolumeReleased
)
t
.
Log
(
"volumes released"
)
framework
.
DeleteAllEtcdKeys
()
}
// TestPersistentVolumeMultiPVsPVCs tests binding of 100 PVC to 100 PVs.
// This test is configurable by KUBE_INTEGRATION_PV_* variables.
func
TestPersistentVolumeMultiPVsPVCs
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
testClient
,
binder
,
watchPV
,
watchPVC
:=
createClients
(
t
,
s
)
defer
watchPV
.
Stop
()
defer
watchPVC
.
Stop
()
...
...
@@ -593,16 +605,17 @@ func TestPersistentVolumeMultiPVsPVCs(t *testing.T) {
glog
.
V
(
2
)
.
Infof
(
"PVC %q is bound to PV %q"
,
pvc
.
Name
,
pvc
.
Spec
.
VolumeName
)
}
testSleep
()
framework
.
DeleteAllEtcdKeys
()
}
// TestPersistentVolumeProvisionMultiPVCs tests provisioning of many PVCs.
// This test is configurable by KUBE_INTEGRATION_PV_* variables.
func
TestPersistentVolumeProvisionMultiPVCs
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
testClient
,
binder
,
watchPV
,
watchPVC
:=
createClients
(
t
,
s
)
defer
watchPV
.
Stop
()
defer
watchPVC
.
Stop
()
...
...
@@ -671,17 +684,17 @@ func TestPersistentVolumeProvisionMultiPVCs(t *testing.T) {
time
.
Sleep
(
time
.
Second
)
}
glog
.
V
(
2
)
.
Infof
(
"TestPersistentVolumeProvisionMultiPVCs: volumes are deleted"
)
framework
.
DeleteAllEtcdKeys
()
}
// TestPersistentVolumeMultiPVsDiffAccessModes tests binding of one PVC to two
// PVs with different access modes.
func
TestPersistentVolumeMultiPVsDiffAccessModes
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
_
,
s
:=
framework
.
RunAMaster
(
t
)
defer
s
.
Close
()
framework
.
DeleteAllEtcdKeys
()
testClient
,
controller
,
watchPV
,
watchPVC
:=
createClients
(
t
,
s
)
defer
watchPV
.
Stop
()
defer
watchPVC
.
Stop
()
...
...
@@ -746,8 +759,6 @@ func TestPersistentVolumeMultiPVsDiffAccessModes(t *testing.T) {
waitForAnyPersistentVolumePhase
(
watchPV
,
api
.
VolumeReleased
)
t
.
Log
(
"volume released"
)
framework
.
DeleteAllEtcdKeys
()
}
func
waitForPersistentVolumePhase
(
client
*
clientset
.
Clientset
,
pvName
string
,
w
watch
.
Interface
,
phase
api
.
PersistentVolumePhase
)
{
...
...
test/integration/pods_test.go
View file @
08f17fef
...
...
@@ -33,6 +33,9 @@ import (
)
func
TestPodUpdateActiveDeadlineSeconds
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
m
.
Handler
.
ServeHTTP
(
w
,
req
)
...
...
@@ -46,7 +49,6 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) {
t
.
Fatalf
(
"Error in bringing up the master: %v"
,
err
)
}
framework
.
DeleteAllEtcdKeys
()
client
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
var
(
...
...
@@ -158,6 +160,9 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) {
}
func
TestPodReadOnlyFilesystem
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
m
.
Handler
.
ServeHTTP
(
w
,
req
)
...
...
@@ -172,7 +177,6 @@ func TestPodReadOnlyFilesystem(t *testing.T) {
t
.
Fatalf
(
"Error in bringing up the master: %v"
,
err
)
}
framework
.
DeleteAllEtcdKeys
()
client
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
pod
:=
&
api
.
Pod
{
...
...
test/integration/quota_test.go
View file @
08f17fef
...
...
@@ -54,6 +54,7 @@ func init() {
// quota_test.go:100: Took 4.196205966s to scale up without quota
// quota_test.go:115: Took 12.021640372s to scale up with quota
func
TestQuota
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
initializationCh
:=
make
(
chan
struct
{})
...
...
test/integration/rbac_test.go
View file @
08f17fef
...
...
@@ -355,6 +355,7 @@ func TestRBAC(t *testing.T) {
}
for
i
,
tc
:=
range
tests
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
...
...
test/integration/scheduler_test.go
View file @
08f17fef
...
...
@@ -53,6 +53,7 @@ type nodeStateManager struct {
}
func
TestUnschedulableNodes
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
...
...
@@ -300,6 +301,7 @@ func DoTestUnschedulableNodes(t *testing.T, restClient *client.Client, nodeStore
}
func
TestMultiScheduler
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
...
...
test/integration/secret_test.go
View file @
08f17fef
...
...
@@ -41,6 +41,9 @@ func deleteSecretOrErrorf(t *testing.T, c *client.Client, ns, name string) {
// TestSecrets tests apiserver-side behavior of creation of secret objects and their use by pods.
func
TestSecrets
(
t
*
testing
.
T
)
{
// TODO: Limit the test to a single non-default namespace and clean this up at the end.
framework
.
DeleteAllEtcdKeys
()
var
m
*
master
.
Master
s
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
m
.
Handler
.
ServeHTTP
(
w
,
req
)
...
...
@@ -53,7 +56,6 @@ func TestSecrets(t *testing.T) {
t
.
Fatalf
(
"Error in bringing up the master: %v"
,
err
)
}
framework
.
DeleteAllEtcdKeys
()
client
:=
client
.
NewOrDie
(
&
restclient
.
Config
{
Host
:
s
.
URL
,
ContentConfig
:
restclient
.
ContentConfig
{
GroupVersion
:
testapi
.
Default
.
GroupVersion
()}})
DoTestSecrets
(
t
,
client
)
}
...
...
test/integration/service_account_test.go
View file @
08f17fef
...
...
@@ -336,7 +336,6 @@ func TestServiceAccountTokenAuthentication(t *testing.T) {
// startServiceAccountTestServer returns a started server
// It is the responsibility of the caller to ensure the returned stopFunc is called
func
startServiceAccountTestServer
(
t
*
testing
.
T
)
(
*
clientset
.
Clientset
,
restclient
.
Config
,
func
())
{
framework
.
DeleteAllEtcdKeys
()
// Listener
...
...
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