Fixes intermittent tempest unittest failure of "test_fix_argument_yes".
The bug was in check_uuid.py and not in the test itself. As part of
the fix and backward compatibility, enabled check_uuid.py to run a
validation of a py module from any dir by adding --libpath parameter to
argv.
Closes-Bug:#1918316
Change-Id: If5d3a3852320e1d3b26af433f7a66be7d42e2b84
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
There were two issues with the previous implementation of
_add_import_for_test_uuid():
1) Sometimes the import line was added to the end of the file.
For example,
- when the import line belonged to the first line,
- when there was no tempest import line.
2) Sometimes the import line was not added to the correct import
group (2nd - related third party imports) defined by the pep8
style guide.
This patch makes sure that both issues 1) and 2) are solved. The
import line is now by default added between the tempest imports.
If there is no tempest import the import line is added to the
second import group.
Change-Id: Icbac702d295f7f75b3259ad68dd2345cc1e4d90b
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 new 2.5.0 release of pycodestyle enforces E117
and is not managed by upper-constraints so we have
to fix the violations. Thankfully there are only a
few and they are fixed here.
Change-Id: Ic71eaf9b3552dfa6603632e556b102696c8d76e4
This commit removes of the duplication of skip_tracker in
tempest/lib/cmd and tools. And we already have 'skip-tracker' command.
It comes from tempest/lib/cmd/skip_tracker.py, so I think we don't need
to have duplicated code. So we should deprecate it in tools directory.
This commit also add a default test_path value for convenience and
compatibility.
Change-Id: I43a0a9d115e59c860714a47aea11017e8b58b5e7
We need put a space between a param's name and a param's value in tox
and it would be more clear.
eg: from `tox -epy35` to `tox -e py35`.
Change-Id: I86750f42669bb02dcfac2b62e294d557bf44bd4c
test.idempotent_id should not be allowed anymore on the check
to block containing such wrong usage into tempest anymore.
Change-Id: Ie45b5d4a28b645ad5145ac37decf70f2f08d4229
Most modules are switched to using decorators.idempotent_id and
this patch covers the remaining and removes the old decorator check.
NOTE: The old decorator test.idempotent_id is still necessary to be
used on the other projects.
Change-Id: Ice7f593fbc109863eba11402c2f3af75fc6ab9a1
Closes-Bug: #1616913
So many modules are using test.idempotent_id and this is the first
step for switching to decorators.idempotent_id.
Change-Id: I55a61d40f18f8fa0fea8423ad65302c1e3559205
Related-Bug: #1616913
Looping over the .keys() method of a dictionary is an anti-pattern. In
fact, the method is actually creating a new list which is redundant and
unnecessary. Looping over a dictionary implicitly loops over its keys.
Change-Id: I937d3f060bf95bb86e50fcb5dec8def524f6208e
1) test_list_hosts_with_nonexistent_zone
"and no hosts will be retured", "retured"
2) test_update_default_quotas
"that we go from -1 (unlimitted)", "unlimitted"
...
and so on
Change-Id: I185a792e03f78d34dff4a923d0f34902470497ce
Closes-Bug: #1578930
Adjusted conditional statements to use isinstance when
comparing variables. Isinstance supports inheritance type
checking better than type.
Change-Id: Id194b9edf4cda615de9007bc187b647d4718a567
This commit migrates all of the code from tempest-lib as of it's
current HEAD, 6ad0ce42c2791a28125d38b40e7dcddf32dbeed7. The only
changes made to the tempest-lib code is to update the imports and
other references to tempest_lib. Since in it's new home it should
be tempest.lib.
Partially implements bp tempest-lib-reintegration
Change-Id: Iadc1b61953a86fa9de34e285a0bb083b1ba06fa8