Browse Source

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
changes/82/231882/1
OTSUKA, Yuanying 7 years ago
parent
commit
3ab11cb16b
  1. 9
      magnum/tests/functional/test_k8s_python_client.py
  2. 9
      magnum/tests/functional/test_magnum_python_client.py

9
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)

9
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)

Loading…
Cancel
Save