13 Commits

Author SHA1 Message Date
Dean Troyer
3b2863e369 Fix functional.base.TestCase.openstack() to optionally omit --os-auth-type
Change the functional test TestCase.openstack() method to add a
way to not include the --os-auth-type option in order to test the
default auth-type logic.

Change-Id: I0f1ca2f7517a41278afaad5aaf4e98accb16bea2
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-08-22 11:05:09 -05:00
Dean Troyer
865e182970 Make configuration show not require auth
The configuration show should not require auth to just display the
OSC config object.  Changes to make it not require auth have
knock-on effects of needing to change a bunch of tests that use it
assuming it _does_ require auth so change those to use 'extension list'
instead.

This sets up further testing of the command line options for changes
in behaviour when we switch to straight SDK usage for configuration.

Change-Id: I6c52485341214ba401064c0f2d1e2b95fdc225c0
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-08-01 14:53:02 -05:00
Glenn Van de Water
7741347041 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
2019-03-13 16:16:24 +01:00
Monty Taylor
2dd5393167
Use os-cloud instead of OS env vars for functional tests
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
2019-01-10 14:21:03 +00:00
Akihiro Motoki
f3bbf52b3c Use flake8-import-order plugin
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
2017-08-17 06:55:00 +00:00
Akihiro Motoki
198a486413 network functest: Remove condition for segment test
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
2017-07-27 13:49:03 +00:00
Vu Cong Tuan
b52bbe1eec Trivial fix typos
Change-Id: I72a1da209df38e226ec02d9dbd0142ed4020c0d2
2017-05-30 16:38:27 +07:00
Dean Troyer
871450abcd Fix quota functional tests for nova-net
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
2017-04-26 23:52:34 +00:00
Steve Martinelli
42ac82b1a4 change assert_show_fields to not fail on new fields
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
2017-01-25 13:09:16 -08:00
Rodolfo Alonso Hernandez
6b114cd98f Add support for Network QoS rule commands
Added following commands:
  - network qos rule create --type minimum-bandwidth
                                   dscp-marking
                                   limit-bandwidth
  - network qos rule delete
  - network qos rule list
  - network qos rule set
  - network qos rule show

Closes-Bug: 1609472
Depends-On: I2e8869750024a8ccbc7777b95fe8ef6e26ec0885
Depends-On: Ife549ff6499217ca65e2554be8ef86ea7866b2d8

Change-Id: Ib3e1951f0917f5f23c8d9e0a380d19da2b3af5f0
2017-01-09 18:05:30 +00:00
Kyrylo Romanenko
acc39673ab Rename variable to avoid shadowing of built-in name
Change-Id: I06e2617db1d5508723bc343072a15586af89b390
2016-10-18 19:12:23 +03:00
Richard Theis
4f23a77de0 Add network segment create, delete and set support
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
2016-09-09 15:19:55 -05:00
Steve Martinelli
c14d3efe61 move all functional tests to tests module
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
2016-09-09 03:29:47 +00:00