The Python 2.7 Support has been removed by:
https://review.opendev.org/#/c/704096/
So remove hacking rules for compatibility between python 2 and 3
Change-Id: I0e78b982b79674520c7695c0cca7352677d7b7a0
This commit makes to use os.path.join instead of using the Unix path
character '/'. This change is not mandatory since we don't support
Windows environments as Tempest execution and, it seems Windows supports
'/' as a path separator. However, using both os.path.join and '/' is a
bit awkward.
Change-Id: I117acb281c352179d526808009e761335bb314fc
in order to enhance the cmd to support kubernetes url based
routing over port based routing. Once this is merged I will
submit another patch set to subunit_describe_calls to support
-u --urls (Optional) The path to a JSON file describing the urls
being used by different services. Note Can not be used with -p.
Added test cases for cliff subprocess and found a bug with the
-v. The standard -v --verbose of cliff conflict with this command
so I changed the -v --verbose to -a --all for print header
with printing to stdout I am also getting ready to add test cases
for cliff subprocess support for different options. Bug #1890060
Correct os join in test cases to avoid a conflict with
https://review.opendev.org/#/c/683026
Closes-bug: #1890060
Change-Id: I9459db0dbeda721187ea5f4802c7453c2092dac3
We replaced usage of third party mock by the standard library in:
https://review.opendev.org/#/c/721021/
There are 2 forgotten occurrences where we still use the third
party mock, the patch fixes that.
Change-Id: I7d00be25bb0b70ce55e27790df33d9134c2a52ae
This patch increases test coverage of verify_tempest_config
partially-implements: blueprint tempest-cli-unit-test-coverage
Change-Id: I87966469df42f0fbabfa2b265398a101af414c9f
Concurrency parameter for account-generator command was accepting
negative values and zero.
This patch makes sure that when the account-generator is passed
a negative value or zero, it ends with an error.
Closes-Bug: #1811349
Partially-Implements: blueprint tempest-cli-unit-test-coverage
Change-Id: I4d7de89b2ad3ee91d113da3746fe393d8cce2aa2
This is to add response schema validation for volumes.
NOTE: upload_volume schema is under discussion, so will be merged
in a seperate patch.
https://bugs.launchpad.net/cinder/+bug/1880566
Change-Id: I0613c36e9cc512a1aba1f7952ffbc7447b05198b
partially-implements: blueprint volume-response-schema-validation
This is to add response schema validation for volume snapshots.
Change-Id: I7de5569ed58fb6a3bf8115f89163cd951c19d951
partially-implements: blueprint volume-response-schema-validation
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: If1de2f48da1fd6ed3f96c98b8dce9eace4f8095d
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This patch add the option --worker-file on tempest run command.
This will enable users to specify a worker file that will be used
by stestr to manually schedule how the tests will run.
Change-Id: I747f3abe179492da063fcaaf1123ffcf6362f966
NetworkQuotaService class enables deletion of network quotas which
were neglected by tempest cleanup before.
Change-Id: I83ac30960c0be39fc5147d445cb39cb3ff4c56b2
Use of os-tenant-name or OS_TENANT_NAME is deprecated.
Instead of it, os-project-name is expected to be used.
This patch depends on below mentioned patch, since
devstack still uses the deprecated argument.
Depends-on: I624e1dc57a3d3533322fb298c01f70241d0400ed
Signed-off by: Soniya Vyas<svyas@redhat.com>
Change-Id: I3b926f8abb6fce3d2eab93310ce3959c68aa9a6d
RegionService class enables deletion of regions which were
neglected by tempest cleanup before.
Change-Id: I2c978a7b2151b37bb0a224bafd1be490f04950ee
Closes-Bug: #1848672
This is to fix invalid assertIsNone state of
"self.assertIsNone(None, self.run_cmd._build_regex(args))".
Change-Id: I4878632cabc75097b6e975a5a2dcce6945d30958
tempest cleanup doesn't check if the APIs it uses are
implemented or not. Therefore the patch adds a try
except block preventing tempest cleanup to fail when
some of the APIs are not implemented.
Closes-bug: #1832566
Change-Id: I9ced4af40eb0c2a22e3557caded56045a397d539
This PS will check config file passed from command line is actually
existing or not in tempest run command. If file exists, only then it
will go for set config path otherwise will fail with value error.
Also adding and modifying unit test cases for this change.
Partially-Implements: blueprint tempest-cli-unit-test-coverage
Change-Id: I09d756be69cb3a9be8d0638c41d45a089d62b238
Closes-Bug: #1808473
autopep8 is an automated code formatting tool for python,
it does not know everything, also not super fast,
but it is faster than I can manually reformat the code.
tools/format.sh will call the formatting,
the tox will check did you called it.
Also adding a tox -eautopep8 way to use it.
autopep8 formats the lines in one way,
where tempest used a another way it was changed.
Change-Id: I6d51b14a5a5b87761071d0927fca23ba1651aa41
The review adds support for NetworkSubnetPools service,
so if there are leftover subnet pools, tempest cleanup
is able to detect them and remove eventually.
Change-Id: Ieecde490d5eb20e1a894a7bdf3bcf0e7a54c08e2
Related-Bug: #1812660
In the previous patches, tempest cleanup got improved
and new methods were implemented. This review adds
more unit tests to exercise those changes and to
improve tempest cleanup test coverage.
Change-Id: Ibf30162e49a8cf87accdbe7f0a6cc38941873d5e
Related-Bug: #1812660
When using python3 the file which is read and
loaded by jsonutils needs to be opened in binary
mode, otherwise, it's causing problems.
It is a known bug [1] in jsonutils from
oslo.serialization module.
The patch also adds a unit test which tests
the loading of a json file.
[1] https://bugs.launchpad.net/oslo.serialization/+bug/1515231
Closes-Bug: #1806089
Change-Id: I3db71c6662d9137a4b75381de7d6dbddd3de4e09
This patch will add the missing test cases for regex parameter
and black-regex parameter in tempest run command.
These tests will helps in coverage of tempest run CLI.
Change-Id: I860689178ddaf927fdfb2921561e6c124bc0da49
Partially-Implements: blueprint tempest-cli-unit-test-coverage
Blacklist-file parameter is used to exclude the regex
and will run the tests using tempest run command.
This patch will add the tests for tempest run based
on blacklist-file parameter.
Change-Id: Ib4070dddffb241556d34c877cc537b5eb971df5e
Partially-Implements: blueprint tempest-cli-unit-test-coverage
Whitelist-file parameter is used to include the regex
and will run the tests using tempest run command.
This patch will add the tests for tempest run based
on whitelist-file parameter.
Change-Id: Ic20588c2eb553039bedc7f9de75da052a800246a
Partially-Implements: blueprint tempest-cli-unit-test-coverage
There are multiple cases found as missing for tempest workspace.
This patch set will cover both positive and negative missing tests.
It will improve tempest workspace CLI.
Change-Id: I06d04acad43533d7f2e912a4a8425da06561b0fa
Partially-Implements: blueprint tempest-cli-unit-test-coverage
This PS will fix the invalid value handling.
Error will be raised if no/blank value will be specified for
workspace register and workspace move for path parameter.
Change-Id: I0d9956cac27fd4dbb527fd865aa152e4724c01f9
Closes-Bug: #1799883
Partially-Implements: blueprint tempest-cli-unit-test-coverage
There is lack of unit tests for CLI of tempest run.
This patch will add the missing unit tests.
It will cover both positive and negative cases.
Change-Id: If8565f3452193031cf72ee16c7e60c2fa202367f
Partially-Implements: blueprint tempest-cli-unit-test-coverage
Adding a new test which is missing from account generator resources.
Test name: test_generate_resources_swift_no_admin
This patch set will add the test to check generate resources when
Swift is enable but admin is not. It will also add some missing
checks in another tests.
Change-Id: I2b8991dd8aa20736d2b9f978a977fc227ed0ab8b
Partially-Implements: blueprint tempest-cli-unit-test-coverage
This patch set changes logic in test_get_config_file which
is currently referencing environment variables for test
execution, but this leads to non-deterministic behavior.
Tests are failing sometimes (e.g. [0]) because of cross-pollination
between tests, meaning that one test can change the value of
os.environ['TEMPEST_CONFIG_DIR'] (for example) causing this
test to fail. To make the test always pass, the same
values are always returned via mocking.
This assumes that tempest/etc exists which is a valid
assumption since it should always be in the repo [1].
[0] http://logs.openstack.org/30/577730/17/check/openstack-tox-py36/207ab05/testr_results.html.gz
[1] dfe511eef2/etc
Change-Id: I5e3b608b8813e33cc45a2d45e384a4cf91a01a39
Closes-Bug: #1796073
This PS will fix the invalid value handling.
Error will be raised if no/blank value will be specified for
workspace register name and workspace rename.
Change-Id: Id8a3f496a8902bd7f0d66254ee8fa148675974e9
Closes-Bug: #1791007
Some of test cases are missing from "test_verify_tempest_config"
This patch will add them.
It will cover both positive and negative unit tests.
Change-Id: I0c929749039ec8d30dc801a1d3d0f53e3415a102
Partially-Implements: blueprint tempest-cli-unit-test-coverage
There is redundant value used for spec in account_generator.py
There is no use of duplicate value as it makes the
code inconsistent.
This patch set will correct the code and also the test
cases which are wrongly designed as per redundant code.
Change-Id: I4bd31f7bb88943b0981c7081f82d80aa28dcdfa4
Added new MockFunctions base class to mock one or more functions
Added test_cleanup_services to run cleanup tests for global services
(flavor, image, user, project, domain, role)
tests
-dry_run
-save_state
-delete
-preserve
Network service tests up-coming.
Change-Id: If6d5f8de282f4f291c0f51f44938f2febc0efda4
It will check the positive and negative case for sending data
and sending no data to ensure path variable is set properly.
Partially-Implements: blueprint tempest-cli-unit-test-coverage
Related-Bug: #1783751
Change-Id: I996ec912ed39ecc3c3ca293c257126b910b3e958
In test_run.py, there is a variable "parsed_args.config_file"
which is used twice during it's assignment.
Second time assignment is overwriting the assignment of first time.
So this patch set will remove the un-necessary duplicity.
Change-Id: I03dfb6990984a165d49ed9742f20e243370dc765
Partially-Implements: blueprint tempest-cli-unit-test-coverage
Glance v1 APIs are deprecated and v2 APIs are current one,
but CONF.image_feature_enabled.api_v1 now defaults to True,
so CONF.image_feature_enabled.api_v1 must be explicitly set
to False in tempest.conf to avoid using api_v1, which is
annoying. So this is to set CONF.image_feature_enabled.api_v1
default to False.
Change-Id: Iab3a209c744375bf2618afc00a3f7731b62f557e