@@ -318,8 +318,10 @@ def test_replication_controller_apis(self):
318
318
self .assertEqual (name , resp .metadata .name )
319
319
self .assertEqual (2 , resp .spec .replicas )
320
320
321
- resp = api .delete (
322
- name = name , body = {}, namespace = 'default' )
321
+ api .delete (
322
+ name = name ,
323
+ namespace = 'default' ,
324
+ propagation_policy = 'Background' )
323
325
324
326
def test_configmap_apis (self ):
325
327
client = DynamicClient (api_client .ApiClient (configuration = self .config ))
@@ -357,29 +359,36 @@ def test_configmap_apis(self):
357
359
resp = api .delete (
358
360
name = name , body = {}, namespace = 'default' )
359
361
360
- resp = api .get (namespace = 'default' , pretty = True , label_selector = "e2e-test=true" )
362
+ resp = api .get (
363
+ namespace = 'default' ,
364
+ pretty = True ,
365
+ label_selector = "e2e-test=true" )
361
366
self .assertEqual ([], resp .items )
362
-
367
+
363
368
def test_node_apis (self ):
364
369
client = DynamicClient (api_client .ApiClient (configuration = self .config ))
365
370
api = client .resources .get (api_version = 'v1' , kind = 'Node' )
366
371
367
372
for item in api .get ().items :
368
373
node = api .get (name = item .metadata .name )
369
374
self .assertTrue (len (dict (node .metadata .labels )) > 0 )
370
-
371
- # test_node_apis_partial_object_metadata lists all nodes in the cluster, but only retrieves object metadata
375
+
376
+ # test_node_apis_partial_object_metadata lists all nodes in the cluster,
377
+ # but only retrieves object metadata
372
378
def test_node_apis_partial_object_metadata (self ):
373
379
client = DynamicClient (api_client .ApiClient (configuration = self .config ))
374
380
api = client .resources .get (api_version = 'v1' , kind = 'Node' )
375
-
376
- params = {'header_params' : {'Accept' : 'application/json;as=PartialObjectMetadataList;v=v1;g=meta.k8s.io' }}
381
+
382
+ params = {
383
+ 'header_params' : {
384
+ 'Accept' : 'application/json;as=PartialObjectMetadataList;v=v1;g=meta.k8s.io' }}
377
385
resp = api .get (** params )
378
386
self .assertEqual ('PartialObjectMetadataList' , resp .kind )
379
387
self .assertEqual ('meta.k8s.io/v1' , resp .apiVersion )
380
388
381
- params = {'header_params' : {'aCcePt' : 'application/json;as=PartialObjectMetadataList;v=v1;g=meta.k8s.io' }}
389
+ params = {
390
+ 'header_params' : {
391
+ 'aCcePt' : 'application/json;as=PartialObjectMetadataList;v=v1;g=meta.k8s.io' }}
382
392
resp = api .get (** params )
383
393
self .assertEqual ('PartialObjectMetadataList' , resp .kind )
384
394
self .assertEqual ('meta.k8s.io/v1' , resp .apiVersion )
385
-
0 commit comments