@@ -76,21 +76,6 @@ def test_create_apps_deployment_from_yaml_obj(self):
7676            name = "nginx-app-3" , namespace = "default" ,
7777            body = {})
7878
79-     def  test_create_extensions_deployment_from_yaml (self ):
80-         """ 
81-         Should be able to create an extensions/v1beta1 deployment. 
82-         """ 
83-         k8s_client  =  client .api_client .ApiClient (configuration = self .config )
84-         utils .create_from_yaml (
85-             k8s_client , self .path_prefix  +  "extensions-deployment.yaml" )
86-         ext_api  =  client .ExtensionsV1beta1Api (k8s_client )
87-         dep  =  ext_api .read_namespaced_deployment (name = "nginx-deployment" ,
88-                                                  namespace = "default" )
89-         self .assertIsNotNone (dep )
90-         ext_api .delete_namespaced_deployment (
91-             name = "nginx-deployment" , namespace = "default" ,
92-             body = {})
93- 
9479    def  test_create_pod_from_yaml (self ):
9580        """ 
9681        Should be able to create a pod. 
@@ -172,7 +157,7 @@ def test_create_deployment_non_default_namespace_from_yaml(self):
172157        utils .create_from_yaml (
173158            k8s_client , self .path_prefix  +  "dep-deployment.yaml" )
174159        core_api  =  client .CoreV1Api (k8s_client )
175-         ext_api  =  client .ExtensionsV1beta1Api (k8s_client )
160+         ext_api  =  client .AppsV1Api (k8s_client )
176161        nmsp  =  core_api .read_namespace (name = "dep" )
177162        self .assertIsNotNone (nmsp )
178163        dep  =  ext_api .read_namespaced_deployment (name = "nginx-deployment" ,
@@ -224,7 +209,7 @@ def test_create_general_list_from_yaml(self):
224209        utils .create_from_yaml (
225210            k8s_client , self .path_prefix  +  "list.yaml" )
226211        core_api  =  client .CoreV1Api (k8s_client )
227-         ext_api  =  client .ExtensionsV1beta1Api (k8s_client )
212+         ext_api  =  client .AppsV1Api (k8s_client )
228213        svc  =  core_api .read_namespaced_service (name = "list-service-test" ,
229214                                               namespace = "default" )
230215        self .assertIsNotNone (svc )
@@ -355,7 +340,7 @@ def test_create_from_multi_resource_yaml_with_conflict(self):
355340
356341    def  test_create_from_multi_resource_yaml_with_multi_conflicts (self ):
357342        """ 
358-         Should create an extensions/v1beta1  deployment 
343+         Should create an apps/v1  deployment 
359344        and fail to create the same deployment twice. 
360345        Should raise an exception that contains two error messages. 
361346        """ 
@@ -365,14 +350,14 @@ def test_create_from_multi_resource_yaml_with_multi_conflicts(self):
365350                k8s_client , self .path_prefix  +  "triple-nginx.yaml" )
366351        exp_error  =  ('Error from server (Conflict): {"kind":"Status",' 
367352                     '"apiVersion":"v1","metadata":{},"status":"Failure",' 
368-                      '"message":"deployments.extensions  \\ "triple-nginx\\ " ' 
353+                      '"message":"deployments.apps  \\ "triple-nginx\\ " ' 
369354                     'already exists","reason":"AlreadyExists",' 
370-                      '"details":{"name":"triple-nginx","group":"extensions ",' 
355+                      '"details":{"name":"triple-nginx","group":"apps ",' 
371356                     '"kind":"deployments"},"code":409}\n ' 
372357                     )
373358        exp_error  +=  exp_error 
374359        self .assertEqual (exp_error , str (cm .exception ))
375-         ext_api  =  client .ExtensionsV1beta1Api (k8s_client )
360+         ext_api  =  client .AppsV1Api (k8s_client )
376361        dep  =  ext_api .read_namespaced_deployment (name = "triple-nginx" ,
377362                                                 namespace = "default" )
378363        self .assertIsNotNone (dep )
@@ -386,7 +371,8 @@ def test_create_namespaces_apps_deployment_from_yaml(self):
386371        """ 
387372        k8s_client  =  client .api_client .ApiClient (configuration = self .config )
388373        utils .create_from_yaml (
389-             k8s_client , self .path_prefix  +  "apps-deployment.yaml" , namespace = self .test_namespace )
374+             k8s_client , self .path_prefix  +  "apps-deployment.yaml" ,
375+             namespace = self .test_namespace )
390376        app_api  =  client .AppsV1beta1Api (k8s_client )
391377        dep  =  app_api .read_namespaced_deployment (name = "nginx-app" ,
392378                                                 namespace = self .test_namespace )
@@ -395,14 +381,15 @@ def test_create_namespaces_apps_deployment_from_yaml(self):
395381            name = "nginx-app" , namespace = self .test_namespace ,
396382            body = {})
397383
398-     def  test_create_from_list_in_multi_resource_yaml (self ):
384+     def  test_create_from_list_in_multi_resource_yaml_namespaced (self ):
399385        """ 
400386        Should be able to create the items in the PodList and a deployment 
401-         specified in the multi-resource file 
387+         specified in the multi-resource file in a test namespace  
402388        """ 
403389        k8s_client  =  client .api_client .ApiClient (configuration = self .config )
404390        utils .create_from_yaml (
405-             k8s_client , self .path_prefix  +  "multi-resource-with-list.yaml" , namespace = self .test_namespace )
391+             k8s_client , self .path_prefix  +  "multi-resource-with-list.yaml" ,
392+             namespace = self .test_namespace )
406393        core_api  =  client .CoreV1Api (k8s_client )
407394        app_api  =  client .AppsV1beta1Api (k8s_client )
408395        pod_0  =  core_api .read_namespaced_pod (
0 commit comments