@@ -41,12 +41,12 @@ def tearDownClass(cls):
41
41
42
42
def test_create_apps_deployment_from_yaml (self ):
43
43
"""
44
- Should be able to create an apps/v1beta1 deployment.
44
+ Should be able to create an apps/v1 deployment.
45
45
"""
46
46
k8s_client = client .api_client .ApiClient (configuration = self .config )
47
47
utils .create_from_yaml (
48
48
k8s_client , self .path_prefix + "apps-deployment.yaml" )
49
- app_api = client .AppsV1beta1Api (k8s_client )
49
+ app_api = client .AppsV1Api (k8s_client )
50
50
dep = app_api .read_namespaced_deployment (name = "nginx-app" ,
51
51
namespace = "default" )
52
52
self .assertIsNotNone (dep )
@@ -68,7 +68,7 @@ def test_create_apps_deployment_from_yaml_obj(self):
68
68
69
69
utils .create_from_dict (k8s_client , yml_obj )
70
70
71
- app_api = client .AppsV1beta1Api (k8s_client )
71
+ app_api = client .AppsV1Api (k8s_client )
72
72
dep = app_api .read_namespaced_deployment (name = "nginx-app-3" ,
73
73
namespace = "default" )
74
74
self .assertIsNotNone (dep )
@@ -289,7 +289,7 @@ def test_create_from_list_in_multi_resource_yaml(self):
289
289
utils .create_from_yaml (
290
290
k8s_client , self .path_prefix + "multi-resource-with-list.yaml" )
291
291
core_api = client .CoreV1Api (k8s_client )
292
- app_api = client .AppsV1beta1Api (k8s_client )
292
+ app_api = client .AppsV1Api (k8s_client )
293
293
pod_0 = core_api .read_namespaced_pod (
294
294
name = "mock-pod-0" , namespace = "default" )
295
295
self .assertIsNotNone (pod_0 )
@@ -365,15 +365,16 @@ def test_create_from_multi_resource_yaml_with_multi_conflicts(self):
365
365
name = "triple-nginx" , namespace = "default" ,
366
366
body = {})
367
367
368
- def test_create_namespaces_apps_deployment_from_yaml (self ):
368
+ def test_create_namespaced_apps_deployment_from_yaml (self ):
369
369
"""
370
- Should be able to create an apps/v1beta1 deployment.
370
+ Should be able to create an apps/v1beta1 deployment
371
+ in a test namespace.
371
372
"""
372
373
k8s_client = client .api_client .ApiClient (configuration = self .config )
373
374
utils .create_from_yaml (
374
375
k8s_client , self .path_prefix + "apps-deployment.yaml" ,
375
376
namespace = self .test_namespace )
376
- app_api = client .AppsV1beta1Api (k8s_client )
377
+ app_api = client .AppsV1Api (k8s_client )
377
378
dep = app_api .read_namespaced_deployment (name = "nginx-app" ,
378
379
namespace = self .test_namespace )
379
380
self .assertIsNotNone (dep )
@@ -391,7 +392,7 @@ def test_create_from_list_in_multi_resource_yaml_namespaced(self):
391
392
k8s_client , self .path_prefix + "multi-resource-with-list.yaml" ,
392
393
namespace = self .test_namespace )
393
394
core_api = client .CoreV1Api (k8s_client )
394
- app_api = client .AppsV1beta1Api (k8s_client )
395
+ app_api = client .AppsV1Api (k8s_client )
395
396
pod_0 = core_api .read_namespaced_pod (
396
397
name = "mock-pod-0" , namespace = self .test_namespace )
397
398
self .assertIsNotNone (pod_0 )
0 commit comments