Commit Graph

80 Commits (0ea2c01d757375d54aa9a9de34c2c9995bb48d13)

Author SHA1 Message Date
Zuul 9c71dcfa7c Merge "Bump hacking to 1.1.0" 5 years ago
Felipe Monteiro 4d011af928 Hacking checks for negative test cases
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
5 years ago
Stephen Finucane fc42cc6be7 Bump hacking to 1.1.0
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
5 years ago
Stephen Finucane 7f4a6211bf Mark raw strings as such
This is raising warnings now and will be an error in future versions of
Python 3.

Change-Id: I8827cb36ef2ef85e8f245a2a181fb23ee75bfd16
5 years ago
Masayuki Igawa e49659886e
Cleanup ignored_list_T110.txt
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
5 years ago
Federico Ressi 2d6bcaa7e5 Fix code to pass pep8 Tox environment.
Command tox -e pep8 is failing making CI to fail: this fixes it.

Change-Id: I5b1acfc4ba2e0eb16f50bfd1cdaa8edc361923d1
5 years ago
junboli bc2ae8629c Unsupported 'message' Exception attribute in PY3
* 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
6 years ago
Ken'ichi Ohmichi f741d0b35a Add T115 for admin test path
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
6 years ago
Ken'ichi Ohmichi fe97e0dfe4 Cleanup ignored_list for T110 and T111
Change-Id: I37d2415571195f09bd4d0754ca0aeda9c0b0e76f
6 years ago
Shu Yingya 4480707dfb Delete Savanna element in client list
There are not savanna any more.
The Savannaclient are also deprecated, so just delete it!

Change-Id: I3df64eb6ca1f6b6b663b6fe41f678ebc60ffd896
7 years ago
Matthew Treinish c9cbb0f0ec
Remove trove tests from tempest
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
7 years ago
Ken'ichi Ohmichi 131799e631 Define routers_client as library interface
Current routers_client has good interfaces, so we can define it as
library interface now.

Change-Id: I37f805065e52c7351279c4503719817c2271a13e
7 years ago
Jenkins 55fd59831c Merge "Add hacking rule to enfore no config in tempest.lib" 7 years ago
Matthew Treinish 59d9eaabdd
Add hacking rule to enfore no config in tempest.lib
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
7 years ago
Jenkins c2c90574a7 Merge "Remove Ceilometer tempest tests" 7 years ago
Andrea Frittoli (andreaf) 1370bafda0 Remove few refercences left to tempest-lib
A few places in docs / comments still refer to tempest-lib.
Cleaning those up.

Change-Id: I6a15a6e7e58a49a39b3955c60e16d0c196ec154c
7 years ago
ghanshyam e4796f8de4 Remove Ceilometer tempest tests
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
7 years ago
Ken'ichi Ohmichi d079c8925d Add pep8 check to use data_utils.rand_uuid()
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
7 years ago
Jenkins a912f4c76a Merge "Enable T108 check for network api tests" 7 years ago
Jenkins 2595e65841 Merge "Extend T110 check for lib's service clients" 7 years ago
Ken'ichi Ohmichi 1eb3fb6a7d Enable T108 check for network api tests
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
7 years ago
Ken'ichi Ohmichi 12b28e993b Extend T110 check for lib's service clients
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
7 years ago
Ken'ichi Ohmichi 43e7fcff6f Make ports_client use common waiter method
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
7 years ago
Ken'ichi Ohmichi 0dc9747519 Add pep8 check for tempest.lib import
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
7 years ago
Ken'ichi Ohmichi e35f472fb7 Split out Neutron routers client
Splitting out a routers client for Neutron.

Partially implements blueprint consistent-service-method-names

Change-Id: I9b43d99067778913c235e62040d3a2ca7f4346e8
7 years ago
Matthew Treinish 9e26ca8760
Migrate tempest-lib code into new lib dir
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
7 years ago
Matthew Treinish fc11264f50
Remove zaqar tests from tempest
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
7 years ago
Ken'ichi Ohmichi b5ce7357f2 Use quotas/security_groups clients from tempest-lib
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
7 years ago
Ken'ichi Ohmichi 2c4cb0c999 Make v3 identity_client consistent
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
7 years ago
Ken'ichi Ohmichi 70a24e905b Apply "POST/DELETE" rules to agents_client
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
7 years ago
Ken'ichi Ohmichi f878e6e36d Add network wrapper method checks
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
7 years ago
Jenkins d48c393cdc Merge "Fix T110 violation for database client" 8 years ago
Ken'ichi Ohmichi 096592fa2b Fix T110 violation for database client
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
8 years ago
Jenkins d88f3a34dd Merge "[V3] Rename get_region to show_region" 8 years ago
lei zhang f2f496b656 [V3] Rename get_policy to show_policy
[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
8 years ago
lei zhang cc5a0f8300 [V3] Rename get_region to show_region
[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
8 years ago
Yaroslav Lobankov db4a2e162f Changing directory structure for Cinder clients
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
8 years ago
lei zhang f7169e2924 [V3] Rename get_credential to show_credential
[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
8 years ago
Jenkins 554ca2c165 Merge "[V3] Rename get_group to show_group" 8 years ago
Jenkins c93f4eb630 Merge "Fix T110 violations for image_client" 8 years ago
Jenkins d97c374caa Merge "Add T111 hacking rule for consistent DELETE method" 8 years ago
Jenkins b13a419c1a Merge "Refactor T110 rule" 8 years ago
Jenkins 5e37c03e41 Merge "Change tests to adapt alarm spliting" 8 years ago
Jenkins 8fe28d8b2d Merge "Fix T110 violations for servers_client" 8 years ago
Ken'ichi Ohmichi 6bd6f2095b Fix T110 violations for image_client
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
8 years ago
liu-sheng 67b730e692 Change tests to adapt alarm spliting
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
8 years ago
Ken'ichi Ohmichi b8461cb21f Add T111 hacking rule for consistent DELETE method
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
8 years ago
Yaroslav Lobankov 937438cb4a [V3] Rename get_group to show_group
[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
8 years ago
Ken'ichi Ohmichi 5334660423 Refactor T110 rule
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
8 years ago
Ken'ichi Ohmichi 277d1881cd Fix T110 violations for servers_client
servers_client contained T110 violations, and we need to fix them
before migrating the client to tempest-lib for consistent interfaces.

Change-Id: I10a8c32b53f15063dab087d67123598800b141a0
8 years ago