summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/common
diff options
context:
space:
mode:
authorGlenn Van de Water <glenn.van_de_water@nuagenetworks.net>2019-03-08 16:31:23 +0100
committerGlenn Van de Water <glenn.van_de_water@nuagenetworks.net>2019-03-13 16:16:24 +0100
commit7741347041b078ca4d687597897194d7797d202d (patch)
treea8f7d26920c0b2d00f55676b90a816663131d77e /openstackclient/tests/functional/common
parent28c06d06885b3ae93da07eb14411d92c3df7e792 (diff)
downloadpython-openstackclient-7741347041b078ca4d687597897194d7797d202d.tar.gz
Fix service discovery in functional tests
If a required service is not enabled then we skip the test. The discovery is done by tests/functional/base.py:is_service_enabled but this method is broken, credentials are not passed to the 'openstack service show' command so every call will fail and every test that relies on it will be skipped. This commit fixed that method and the issues that popped up when re-enabling tests. Network segment range: - issue where we assumed network-segment-range extension is always present - issue where we compare integers and string representations of numbers Subnet: - issue where we try to deepcopy an uncopyable object in UnsetSubnet Change-Id: Id3cc907c1ed2a25b49cf6f4a7233e0401a02383a Story: 2005169 Task: 29908
Diffstat (limited to 'openstackclient/tests/functional/common')
-rw-r--r--openstackclient/tests/functional/common/test_extension.py2
-rw-r--r--openstackclient/tests/functional/common/test_quota.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/openstackclient/tests/functional/common/test_extension.py b/openstackclient/tests/functional/common/test_extension.py
index db50855f..92efabef 100644
--- a/openstackclient/tests/functional/common/test_extension.py
+++ b/openstackclient/tests/functional/common/test_extension.py
@@ -26,7 +26,7 @@ class ExtensionTests(base.TestCase):
@classmethod
def setUpClass(cls):
super(ExtensionTests, cls).setUpClass()
- cls.haz_network = base.is_service_enabled('network')
+ cls.haz_network = cls.is_service_enabled('network')
def test_extension_list_compute(self):
"""Test compute extension list"""
diff --git a/openstackclient/tests/functional/common/test_quota.py b/openstackclient/tests/functional/common/test_quota.py
index 85942281..9c057460 100644
--- a/openstackclient/tests/functional/common/test_quota.py
+++ b/openstackclient/tests/functional/common/test_quota.py
@@ -27,7 +27,7 @@ class QuotaTests(base.TestCase):
@classmethod
def setUpClass(cls):
super(QuotaTests, cls).setUpClass()
- cls.haz_network = base.is_service_enabled('network')
+ cls.haz_network = cls.is_service_enabled('network')
cls.PROJECT_NAME =\
cls.get_openstack_configuration_value('auth.project_name')