close the kube-apiserver for taint tests
This commit is contained in:
		| @@ -27,7 +27,7 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"k8s.io/api/core/v1" | 	v1 "k8s.io/api/core/v1" | ||||||
| 	"k8s.io/apimachinery/pkg/api/resource" | 	"k8s.io/apimachinery/pkg/api/resource" | ||||||
| 	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" | ||||||
|   | |||||||
| @@ -85,6 +85,8 @@ func TestTaintNodeByCondition(t *testing.T) { | |||||||
| 	defer algorithmprovider.ApplyFeatureGates()() | 	defer algorithmprovider.ApplyFeatureGates()() | ||||||
|  |  | ||||||
| 	context = initTestScheduler(t, context, false, nil) | 	context = initTestScheduler(t, context, false, nil) | ||||||
|  | 	defer cleanupTest(t, context) | ||||||
|  |  | ||||||
| 	cs := context.clientSet | 	cs := context.clientSet | ||||||
| 	informers := context.informerFactory | 	informers := context.informerFactory | ||||||
| 	nsName := context.ns.Name | 	nsName := context.ns.Name | ||||||
| @@ -655,6 +657,8 @@ func TestTaintBasedEvictions(t *testing.T) { | |||||||
| 	for i, test := range tests { | 	for i, test := range tests { | ||||||
| 		t.Run(test.name, func(t *testing.T) { | 		t.Run(test.name, func(t *testing.T) { | ||||||
| 			context := initTestMaster(t, "taint-based-evictions", admission) | 			context := initTestMaster(t, "taint-based-evictions", admission) | ||||||
|  | 			defer cleanupTest(t, context) | ||||||
|  |  | ||||||
| 			// Build clientset and informers for controllers. | 			// Build clientset and informers for controllers. | ||||||
| 			externalClientset := kubernetes.NewForConfigOrDie(&restclient.Config{ | 			externalClientset := kubernetes.NewForConfigOrDie(&restclient.Config{ | ||||||
| 				QPS:           -1, | 				QPS:           -1, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 David Eads
					David Eads