This patchset adds 2 hacking checks for making sure negative
tests have correct conventions applied.
* T117: Check that each negative test has the
``@decorators.attr(type=['negative'])`` applied
This patch set adds both hacking checks, adds unit tests
and updates HACKING.rst documentation with both new checks.
Closes-Bug: 1781044
Change-Id: I46df351187d22090861150c84fa0a0c1054ae3d6
hacking 1.0+ adds a couple of additional checks that are helpful as part
of the transition to Python 3. However, hacking 1.1.0 incorporated
flake8 2.6.x, which transitioned from pep8 to pycodestyle. Tempest
provides some hacking extensions and these use pep8 imports. As things
stand, projects that wish to use these hacking extensions must either
constrain themselves to the same older hacking versions or install pep8
manually. Neither of these approaches is particularly attractive so
instead transition to hacking 1.1.0 ourselves. This has the benefit of
giving us the additional checks for Python 3.
Change-Id: I09e3d2461366bb439bcb817149ce807a232acfbb
This commit removes "ignored_list_T110.txt". The last entry was
already moved to tempest.lib[0]. So we can remove this file finally.
[0] Ia9aeab78e530c798dfa7b7d6f71e4b3ea3a84b7f
Change-Id: Icfa511c2874da7135d8971471d95892dfbf07882
* Fix unsupported 'message' Exception attribute in PY3
The 'message' attribute has been deprecated and removed from Python3.
Use six.text_type(e) instead of e.message. For more details, please check [1]:
[1] https://www.python.org/dev/peps/pep-0352/
* Add hacking to prevent this from happening in the future.
Change-Id: Id40000c2c453815b04a7d2fd765e19997291d8e3
Sometimes commiters tried to add tempest tests which require admin
credential under non-admin test path and that caused confusions to
tempest users. This patch adds some coding rule to make test path
clear for the maintenance.
NOTE: This patch adds #noqa to AbsoluteLimitsTests because the test
class needs force_tenant_isolation which requires admin
credential indirectly but the test itself is not admin test.
The history is Id71a705cf9b1dd0c0d41a2fb45ab77c95430a123
Change-Id: Id11eec13f2e431af8bbb83ac4904b2047e7932a7
This commit removes the trove tests from tempest as part of plugin
decomposition of tempest. Trove isn't in scope for testing in tempest
anymore and tempest testing will be done via a plugin now.
Change-Id: I0407e96f628e96bd4d3f7f42cf433b756a5bbaa9
This commit adds a hacking rule to enforce that we never add a config
dependency on tempest/lib. Right now we're completely dependent on
reviewers catching this, it is a strong rule so we should ensure we
can't ever land a change that does this.
Change-Id: I1ab1ba52573c6706a50abcd021759c93dd19aa44
Now Ceilometer and Aodh tempest plugins are implemented and all
tests and supported code is present in plugins.
-https://github.com/openstack/aodh/tree/master/aodh/tests/tempest
-https://github.com/openstack/ceilometer/tree/master/ceilometer/tests/tempest
NOTE- Need to keep config option 'CONF.service_available.ceilometer'
as it is being used in Congress tests in Kilo and Liberty branch and
Ceilometer tempest plugin is available since Mitaka.
If we remove that then, we will be breaking Congress gate for stable branches.
Change-Id: I0775bcc15dc9cbae6e075fe92f44b5f6c9b9d5d2
Depends-On: Ic0e6b72d8767d92cc63968c442c4ff65bb001cda
There is a common method for generating random uuid value.
So it is nice to avoid pointing it out on human review to reduce
reviewing workload.
In addition, this patch removes str() around the method calls
because str() is called in the method.
Change-Id: Ic8caea352d27c479fdb765a699d277b59f1c5bb4
Since the commit I3a8660838c1af2baefe21bbc57b006c9889ac35a ,
API tests of neutron advanced services have been migrated from
Tempest. So we can enable T108 check for remaining network api
tests to avoid -1 against small thing on human reviewing.
Change-Id: Ide15543c84d9b171d62db28274dbaecb4e880a6e
Current T110 check is just working for tempest.service modules, but
we have migrated lib's service clients into tempest.lib.service.
So we need to check these modules also on T110.
This patch extends the check for these modules.
Change-Id: Id102ba359f86bb7417e121e70c707aae36a24740
wait_for_resource_deletion() of network_client is used only for
ports_client and Tempest has a common waiter method in its rest
client. So this patch makes ports_client use the method and removes
network_client module for the cleanup.
Partially implements blueprint consistent-service-method-names
Change-Id: I3145163621dbf7c053f040d4c75b1dd16770ba55
tempest.lib should not import local tempest code to avoid circular dependency,
so this patch adds pep8 check to block such kind of code.
Change-Id: I392d28b3195040a800d96171ef275c6e73f9fef4
Splitting out a routers client for Neutron.
Partially implements blueprint consistent-service-method-names
Change-Id: I9b43d99067778913c235e62040d3a2ca7f4346e8
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
These tests aren't run in any gating job that I can find on either
tempest or zaqar. Zaqar also falls outside of the scope we set for
projects with in-tree tempest tests. A plugin is being worked in
zaqar change I06053d2d0d761c6398708280f3ef38274dec390c. But,
since these tests are unverified and haven't been run in quite some
time lets just remove them.
Change-Id: I047392de3341169992fc5e64aec1e571059840a8
The files below have been migrated to tempest-lib
* quotas_client.py : I559c7ec29d6cc85060d59b8b7714a669a277f217
* security_groups_client.py: I559c7ec29d6cc85060d59b8b7714a669a277f217
Now Tempest-lib provides those as stable interfaces. So Tempest should
start using those from lib and remove its own copy.
Change-Id: Ib97637566b5f48523b7b39899f0350fdf8f87a9e
identity_client of v3 API was inconsistent and it was against the
pep8 T110 rule. This patch fixes these inconsistencies.
Partially implements blueprint consistent-service-method-names
Change-Id: Iee460fac7eda8b0c02129e26448304b3c135019e
As the consistent-service-method-names bp, "POST /resources" methods'
names should be "create_<resource name>" and "DELETE /resources/<id>"
methods' names should be "delete_<resource name>".
This patch applies the rules to agents_client.
Partially implements blueprint consistent-service-method-names
Change-Id: I505fa196c574027692497848d235781d903cb9f6
The pep8 rules T110/T111 check the method names of service clients,
but the rules could not find violations on network clients because
these clients use some wrapper methods.
This patch adds some checks for covering network clients.
Partially implements blueprint consistent-service-method-names
Change-Id: I4aede28261626a27a3a857ba05c1a0fdcc3cac5b
T110 requires methods, which calls GET, should be "list_<resource>s"
or "show_<resource>" as these names for consistency.
In addition, the other service clients doesn't contain "_details" on
the method names.
So this patch renames get_db_flavor_details to show_db_flavor on
database client.
Partially implements blueprint consistent-service-method-names
Change-Id: Ia0b509ad9c4413c3ea9910e06d7c60c0c4f6896e
[GET /resources] methods should be "list_<resource name>s"
or "show_<resource name>", so this patch applies the rule
to policy client.
Partially implements blueprint consistent-service-method-names
Change-Id: Ic4cfe4a5ec5695d943f7dca9579c545285fb2719
[GET /resources] methods should be "list_<resource name>s"
or "show_<resource name>", so this patch applies the rule
to region client
Partially implements blueprint consistent-service-method-names
Change-Id: I5fc446b2e5f8931a1a8b27b0db03956a0e3ad8b2
The tempest/services/volume directory had the following structure:
tempest
|___services
|___volume
|____json
| |____admin
| | |____<client files>
| |
| |____<client files>
|
|____v2
|____json
|____admin
| |____<client files>
|
|____<client files>
The structure was changed to keep consistency with other clients directories.
For example, the tempest/services/identity derectory and the tempest/services/image
directory. So now the structure is the following:
tempest
|___services
|___volume
|____base
| |____<client files>
|
|____v1
| |____json
| |____admin
| | |____<client files>
| |
| |____<client files>
|
|____v2
|____json
|____admin
| |____<client files>
|
|____<client files>
The tempest/services/volume/base directory was created and now it containes base
client files with base client classes for v1 and v2 Cinder clients.
Change-Id: I0ac37e15eddffb12d150dcd5b68e0f933712d22c
[GET /resources] methods should be "list_<resource name>s"
or "show_<resource name>", so this patch applies the rule
to credentials client.
Partially implements blueprint consistent-service-method-names
Change-Id: I07c4403e42d6f2c7617f455a8a4f292ff10e7059
image_client contained T110 violations, and we need to fix them
before migrating the client to tempest-lib for consistent interfaces.
Partially implements blueprint consistent-service-method-names
Change-Id: I376efbc703762473ab69bfe424064bf32c4e78a5
Currently, alarm module has been diceded to be splitted out from
Ceilometer tree, named as aodh. This change make tests adapt to the
spliting.
NOTE: This change temporarily set the aodh service availability config
option as False, it is mainly because the alarming service spliting
change[1] need to be merged now. I will enable aodh in tempest and
make it works by another change.
[1] https://review.openstack.org/#/c/197161/
Closes-Bug: #1509885
Change-Id: I3983128d2d964b0f1f3326948b27f5d94df65a04
As the consistent-service-method-names bp, "DELETE /resources/<id>"
methods' names should be "delete_<resource name>".
So this patch adds it as the hacking rule.
Partially implements blueprint consistent-service-method-names
Change-Id: I36592a91001361d816e302745fe8417aee5e7565
[GET /resources] methods should be "list_<resource name>s"
or "show_<resource name>", so this patch applies the rule
to groups client.
Partially implements blueprint consistent-service-method-names
Change-Id: Ia6c83f9bad2684c61e694e52244ea54c98d9d070
We need to implement more rules for the other methods(DELETE/POST/PUT)
for consistent method names. Before doing that, this patch separates
common part from T110 rule for sharing it.
Partially implements blueprint consistent-service-method-names
Change-Id: I24c90d331a45a4f6ad50303c4d17e7cd4d2d784c
servers_client contained T110 violations, and we need to fix them
before migrating the client to tempest-lib for consistent interfaces.
Change-Id: I10a8c32b53f15063dab087d67123598800b141a0