Skip to content

Commit c684b04

Browse files
committed
rm extension tests, update util tests
1 parent a05c331 commit c684b04

File tree

5 files changed

+12
-105
lines changed

5 files changed

+12
-105
lines changed

kubernetes/e2e_test/test_extensions.py

Lines changed: 0 additions & 94 deletions
This file was deleted.

kubernetes/e2e_test/test_utils.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ def tearDownClass(cls):
4141

4242
def test_create_apps_deployment_from_yaml(self):
4343
"""
44-
Should be able to create an apps/v1beta1 deployment.
44+
Should be able to create an apps/v1 deployment.
4545
"""
4646
k8s_client = client.api_client.ApiClient(configuration=self.config)
4747
utils.create_from_yaml(
4848
k8s_client, self.path_prefix + "apps-deployment.yaml")
49-
app_api = client.AppsV1beta1Api(k8s_client)
49+
app_api = client.AppsV1Api(k8s_client)
5050
dep = app_api.read_namespaced_deployment(name="nginx-app",
5151
namespace="default")
5252
self.assertIsNotNone(dep)
@@ -68,7 +68,7 @@ def test_create_apps_deployment_from_yaml_obj(self):
6868

6969
utils.create_from_dict(k8s_client, yml_obj)
7070

71-
app_api = client.AppsV1beta1Api(k8s_client)
71+
app_api = client.AppsV1Api(k8s_client)
7272
dep = app_api.read_namespaced_deployment(name="nginx-app-3",
7373
namespace="default")
7474
self.assertIsNotNone(dep)
@@ -289,7 +289,7 @@ def test_create_from_list_in_multi_resource_yaml(self):
289289
utils.create_from_yaml(
290290
k8s_client, self.path_prefix + "multi-resource-with-list.yaml")
291291
core_api = client.CoreV1Api(k8s_client)
292-
app_api = client.AppsV1beta1Api(k8s_client)
292+
app_api = client.AppsV1Api(k8s_client)
293293
pod_0 = core_api.read_namespaced_pod(
294294
name="mock-pod-0", namespace="default")
295295
self.assertIsNotNone(pod_0)
@@ -365,15 +365,16 @@ def test_create_from_multi_resource_yaml_with_multi_conflicts(self):
365365
name="triple-nginx", namespace="default",
366366
body={})
367367

368-
def test_create_namespaces_apps_deployment_from_yaml(self):
368+
def test_create_namespaced_apps_deployment_from_yaml(self):
369369
"""
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.
371372
"""
372373
k8s_client = client.api_client.ApiClient(configuration=self.config)
373374
utils.create_from_yaml(
374375
k8s_client, self.path_prefix + "apps-deployment.yaml",
375376
namespace=self.test_namespace)
376-
app_api = client.AppsV1beta1Api(k8s_client)
377+
app_api = client.AppsV1Api(k8s_client)
377378
dep = app_api.read_namespaced_deployment(name="nginx-app",
378379
namespace=self.test_namespace)
379380
self.assertIsNotNone(dep)
@@ -391,7 +392,7 @@ def test_create_from_list_in_multi_resource_yaml_namespaced(self):
391392
k8s_client, self.path_prefix + "multi-resource-with-list.yaml",
392393
namespace=self.test_namespace)
393394
core_api = client.CoreV1Api(k8s_client)
394-
app_api = client.AppsV1beta1Api(k8s_client)
395+
app_api = client.AppsV1Api(k8s_client)
395396
pod_0 = core_api.read_namespaced_pod(
396397
name="mock-pod-0", namespace=self.test_namespace)
397398
self.assertIsNotNone(pod_0)

kubernetes/e2e_test/test_yaml/apps-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apps/v1beta1
1+
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: nginx-app

kubernetes/e2e_test/test_yaml/multi-resource-with-list.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ items:
2424
image: busybox
2525
command: ['sh', '-c', 'echo Hello Kubernetes! && sleep 3600']
2626
---
27-
apiVersion: apps/v1beta1
27+
apiVersion: apps/v1
2828
kind: Deployment
2929
metadata:
3030
name: mock

0 commit comments

Comments
 (0)