summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/base.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix typos"Zuul2022-05-161-2/+2
|\
| * Fix typosCyril Roelandt2021-10-261-2/+2
| | | | | | | | Change-Id: Idd502c8df21da79ff3b9339870f38378f5337879
* | tests: Improve logging for executed commandsStephen Finucane2021-12-091-6/+15
|/ | | | | | | | | | | | | We're seeing failures in a recently added tests, 'ServerTests.test_server_add_remove_volume' from 'openstackclient/tests/functional/compute/v2/test_server.py'. These failures are likely the result of slow CI nodes, but we don't have enough information in the CI logs to debug them. Starting logging the various commands executed in tests so that we can see these logs if and when tests fail. Change-Id: I4584dc5e6343fe8c8544431a527d8c3c7e7b3c5b Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* tests: Handle removal of block-storage v2 APIStephen Finucane2021-07-231-11/+18
| | | | | | | | | | | | | | Cinder recently removed their v2 API [1] which is causing the functional tests to fail. Improve our 'is_service_enabled' test helper to use the 'versions show' command, which queries the service catalog and can give us information about the service version as well as answer the more general "is this service available" question. We also resolve a long-standing TODO in the process. [1] https://review.opendev.org/c/openstack/cinder/+/792299 Change-Id: I381069357aa008344e15327adf3a863c0c2e1f04 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Delete the testcases that arent needed anymoremb711d2020-07-231-4/+0
| | | | | | | | The file test_examples.py has never worked since its written and and cli in the example directory are covered by other functional tests for container, flavor and object lists and they have better asserts. So, deleting the file Change-Id: Ib9af40da96e66354fe878e79a80048a58f8dd6fe
* Fix functional.base.TestCase.openstack() to optionally omit --os-auth-typeDean Troyer2019-08-221-5/+19
| | | | | | | | | 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>
* Make configuration show not require authDean Troyer2019-08-011-3/+11
| | | | | | | | | | | | | | 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>
* Fix service discovery in functional testsGlenn Van de Water2019-03-131-17/+18
| | | | | | | | | | | | | | | | | | | | | 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
* Use os-cloud instead of OS env vars for functional testsMonty Taylor2019-01-101-2/+5
| | | | | | | | | | | | | | 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
* Use flake8-import-order pluginAkihiro Motoki2017-08-171-1/+1
| | | | | | | | | | | | | | | | 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
* network functest: Remove condition for segment testAkihiro Motoki2017-07-271-5/+0
| | | | | | | | | | | | | | | 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
* Trivial fix typosVu Cong Tuan2017-05-301-2/+2
| | | | Change-Id: I72a1da209df38e226ec02d9dbd0142ed4020c0d2
* Fix quota functional tests for nova-netDean Troyer2017-04-261-0/+12
| | | | | | | | | 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
* change assert_show_fields to not fail on new fieldsSteve Martinelli2017-01-251-17/+10
| | | | | | | | | | | | | | | | | 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 support for Network QoS rule commandsRodolfo Alonso Hernandez2017-01-091-0/+5
| | | | | | | | | | | | | | | | | 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
* Rename variable to avoid shadowing of built-in nameKyrylo Romanenko2016-10-181-2/+2
| | | | Change-Id: I06e2617db1d5508723bc343072a15586af89b390
* Add network segment create, delete and set supportRichard Theis2016-09-091-0/+5
| | | | | | | | | | | | | | | | | 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
* move all functional tests to tests moduleSteve Martinelli2016-09-091-0/+120
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