From 3ab11cb16b86be32f01b3ff1ac06c0b3f640578c Mon Sep 17 00:00:00 2001 From: "OTSUKA, Yuanying" Date: Wed, 7 Oct 2015 16:57:04 +0900 Subject: [PATCH] Move k8s resources test to TestKubernetesAPIs Due to client changes [1], listing k8s resources needs bay uuid or name. So this patch moves test for listing k8s resources functional test to `TestKubernetesAPIs`. Because `TestListResources` doesn't have bay uuid or name. [1]: https://review.openstack.org/#/c/231219/ Change-Id: Ieb76fab3e98a62e9b0624d50632f611191220a58 Closes-Bug: #1503587 --- magnum/tests/functional/test_k8s_python_client.py | 9 +++++++++ magnum/tests/functional/test_magnum_python_client.py | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/magnum/tests/functional/test_k8s_python_client.py b/magnum/tests/functional/test_k8s_python_client.py index f87b02273e..0e7814b2cf 100644 --- a/magnum/tests/functional/test_k8s_python_client.py +++ b/magnum/tests/functional/test_k8s_python_client.py @@ -127,3 +127,12 @@ class TestKubernetesAPIs(BaseMagnumClient): resp = self.k8s_api.delete_namespaced_replication_controller( name='frontend', body={}, namespace='default') + + def test_pods_list(self): + self.assertTrue(self.cs.pods.list(self.bay.uuid) is not None) + + def test_rcs_list(self): + self.assertTrue(self.cs.rcs.list(self.bay.uuid) is not None) + + def test_services_list(self): + self.assertTrue(self.cs.services.list(self.bay.uuid) is not None) diff --git a/magnum/tests/functional/test_magnum_python_client.py b/magnum/tests/functional/test_magnum_python_client.py index 9ad7f2e0f2..447f390e89 100644 --- a/magnum/tests/functional/test_magnum_python_client.py +++ b/magnum/tests/functional/test_magnum_python_client.py @@ -26,12 +26,3 @@ class TestListResources(BaseMagnumClient): def test_nodes_list(self): self.assertTrue(self.cs.nodes.list() is not None) - - def test_pods_list(self): - self.assertTrue(self.cs.pods.list() is not None) - - def test_rcs_list(self): - self.assertTrue(self.cs.rcs.list() is not None) - - def test_services_list(self): - self.assertTrue(self.cs.services.list() is not None)