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
In order to support switching auth contexts, such as for registered_limits
which take a system scoped token, switch the functional tests to using
the --os-cloud command line parameter. However, honor the OS_CLOUD env var
as a way that someone can select a different cloud, including 'envvars',
to use.
Use devstack-system-admin cloud for limit tests
Keystone requires these to have system scope now.
Change-Id: Ia81eebd3e00ae986cf3ba7e3d98f3e8a1647b622
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
It enforces loose checking so it sounds good to use it.
This flake8 plugin is already used in tempest.
Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.
Setup for unit tests of hacking rules is tweaked to disable
flake8-import-order checks. This extension assumes an actual file exists
and causes hacking rule unit tests.
Change-Id: I12b596820727aeeb379bee16c2bc993dee9eb637
Previously fucntional tests for network segment feature are skipped
as neutron 'segment' API extension was disabled in the gate.
We now enable neutron 'segment' API extension, so we can safely drop
the check for the segment extension from the test code.
Also setup code in test_network_segment is moved from setUpClass to
setUp. There is no good reason to do them in setUpClass and
having them in setUp simplifies the test code.
no user once this commit is applied.
Change-Id: I183310b94d9b6d7f4311a3859b59dc22d36440db
We need to skip some functional tests when testing against a nova-net cloud
so add the bits to detect that.
Also JSON-ify the quota functional tests and add the skips for nova-net.
Change-Id: Ibfeeb3f967f34c98e80271a8214cf95dc50407f1
whenever a resource adds a field (which is allowed in our API
guidelines), OSC functional tests fail, because we validate
the resource keys to a hardcoded list.
instead, this change proposes that the logic of
assert_show_fields is flipped around, so our hardcoded list acts
as a minimum set of values that must appear in the resource.
as part of this change, some fields were remove from the constants
since they were not actually in the returned data.
also, delete unused code `assert_show_structure`.
Change-Id: I8c0f0e80ea472f9c7f93c5f1f0ae52048e6cd7da
Add network segment create, delete and set in support of routed
networks. This patch set includes documentation, unit tests and
functional tests for the following new commands:
- "os network segment create"
- "os network segment delete"
- "os network segment set"
This patch set also includes support for the name and description
properties.
These new commands are currently marked as beta commands.
Change-Id: I86bc223c4adc5b5fe1b1ee5c9253e43ba52fb5ed
Depends-On: Ib194125162057fccb4e951587c2fa4ec2e2f098c
Partially-Implements: blueprint routed-networks
functional tests should be grouped with other tests (unit and
integration tests). as part of this commit the "common" module
was renamed to just "base", this was done for simplicity.
the post_test_hook.sh file was also copied to the functional module
since it should live there. a separate change to the infra repo
will be made to call the new location, once that is merged we
can remove the old one (a new change will also be posted for that)
Needed-By: I49d54f009021d65c1ae49faf6b3f0a7acdadd7b3
Change-Id: Ie8c334f6223373b8e06df8bd8466500d2a2c8ede