diff options
| author | Glenn Van de Water <glenn.van_de_water@nuagenetworks.net> | 2019-03-08 16:31:23 +0100 |
|---|---|---|
| committer | Glenn Van de Water <glenn.van_de_water@nuagenetworks.net> | 2019-03-13 16:16:24 +0100 |
| commit | 7741347041b078ca4d687597897194d7797d202d (patch) | |
| tree | a8f7d26920c0b2d00f55676b90a816663131d77e /openstackclient/tests/functional/compute | |
| parent | 28c06d06885b3ae93da07eb14411d92c3df7e792 (diff) | |
| download | python-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/compute')
| -rw-r--r-- | openstackclient/tests/functional/compute/v2/test_server.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/openstackclient/tests/functional/compute/v2/test_server.py b/openstackclient/tests/functional/compute/v2/test_server.py index 3cb72d9f..c8fb44d3 100644 --- a/openstackclient/tests/functional/compute/v2/test_server.py +++ b/openstackclient/tests/functional/compute/v2/test_server.py @@ -16,7 +16,6 @@ import uuid from tempest.lib import exceptions -from openstackclient.tests.functional import base from openstackclient.tests.functional.compute.v2 import common from openstackclient.tests.functional.volume.v2 import common as volume_common @@ -27,7 +26,7 @@ class ServerTests(common.ComputeTestCase): @classmethod def setUpClass(cls): super(ServerTests, cls).setUpClass() - cls.haz_network = base.is_service_enabled('network') + cls.haz_network = cls.is_service_enabled('network') def test_server_list(self): """Test server list, set""" |
