summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/integ/cli
Commit message (Collapse)AuthorAgeFilesLines
* Remove os-client-config referencesMonty Taylor2020-06-081-16/+4
| | | | | | | We've depended on openstacksdk for config for ages now, clean up after ourselves and stop installing it in tests. Change-Id: I66b3ec2a36bc462d2f1ac151e95ccbdc946076b8
* Raise flake8-import-order version to latestSean McGinnis2020-01-101-1/+1
| | | | | | | | | | | We had this library capped at a release that is a few years old. Now that we have dropped py2 testing, we can pick up the latest version. This uncovered a few things to clean up. Mostly the fact that mock is now a part of the StdLib unittest since Python 3.3. Change-Id: I27484dd4c25378413ff16e97a35a1a46062357bc Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Make configuration show not require authDean Troyer2019-08-012-46/+91
| | | | | | | | | | | | | | 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>
* Stop leaving temp files after unit test runsBrian Haley2019-05-101-2/+17
| | | | | | | | | | test_shell.CLOUD_2 is using an absolute path for a temp file, so leaves /tmp/test_log_file around after the unit tests are run. Use a fixture instead so it's cleaned automatically, which also removes the possibility of two tests using the same file and interfering with each other. Change-Id: If722b860be4010b91635c6d46f634da980e17152
* Fix SDK Connection creation alternative to ProfileDean Troyer2017-12-071-4/+16
| | | | | | | | | Do a dummy import to determine which SDK is installed (Pre/post merge). This solves the DevStack error "Cloud defaults was not found" in -tips jobs. Depends-On: Ia111f127fbdceac2afe20fd9d1fe032145cdd72c Change-Id: I60c2d418dd5a393eee2cc2a5c2fdebfffdabf2d3
* 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
* Fix unit test failures related to new os-client-config and osc-libAkihiro Motoki2017-07-121-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | [breakage related to os-client-config 1.28.0] os-client-config 1.28.0 add a check if filebased and envvars are both used. This check causes OSC unit test failure. OSC now instantiates OpenStackConfig twice as a workaround. The unit test mocks _load_config_file() and it returns a config dict, but os-client-config OpenStackConfig.__init__ updates the dict returned. As a result, when OpenStackConfig is instantiated second time, the mock of _load_config_file returns a modified version of the config dict. This hits the new check in os-client-config 1.28.0. This commit changes the mock to use side_effect rather than return_value to ensure the original dict is used. [breakage related to osc-lib 1.7.0] The change in osc-lib 1.7.0 added "if" logic to avoid calling get() twice. In tests.unit.volume.test_find_resource, kwargs is empty dict in find_resource(), so the second call to get() is NOT called now. Removing the second elements of side_effect addresses the unit failure. Co-Authored-By: Rui Chen <chenrui.momo@gmail.com> Change-Id: Ib9d14661b2755bbd6619e15c0d9023fbc9d27d70 Closes-Bug: #1703782 Closes-Bug: #1703783
* move unit tests to new "unit" test moduleSteve Martinelli2016-09-083-0/+763
this will better isolate the unit tests from the functional tests. unfortunately, the "integration" tests had to be lumped into the "unit" tests since we need the separation in testr.conf Change-Id: Ifd12198c1f90e4e3c951c73bfa1884ab300d8ded