Commit Graph

7 Commits

Author SHA1 Message Date
Felipe Monteiro 54959dd43b Minimize number of servers created for certain tests
Minimize number of servers created for tests to avoid errors like

    tempest.exceptions.BuildErrorException:
    Server b5ebbe3e-6c30-4589-88b2-aaa52e107bee failed to build
    and is in ERROR status

from happening [0].

This error is happening because too many servers are being created
concurrently in the gate, causing resource errors to be thrown.
This problem is only worsened with higher concurrency -- i.e. 4 -- as
the chances of creating many servers simultaneously across threads
are higher.

This commit:

Minimizes the number of servers that need to be created across classes
by consolidating test cases related to different policy "families" into
one class. This reduces the risk of running into `BuildErrorException`
errors being raised due to too many servers being created simultaneously
especially when higher concurrency is used.

Only applies to:
  * policy "families" that require server creation
  * small policy "families" -- i.e. containing one to three policies

[0] http://logs.openstack.org/56/475156/1/check/gate-tempest-dsvm-patrole-admin-ubuntu-xenial/df9f578/console.html#_2017-06-18_04_39_39_894737

Closes-Bug: #1698835
Change-Id: I3665aa5657dd5531a3b74edee42d6641bb6e6360
2017-06-19 16:46:36 +01:00
Samantha Blanco fba3135950 Removes client aliases
Removes client aliases from Patrole tests

Change-Id: I4995bb26264f14e98d682ed24fa8f457ad9d04fe
Closes-Bug: #1691528
2017-05-19 15:08:48 -04:00
Felipe Monteiro 75f2363601 Renames switchToRbacRole to toggle_rbac_role
This is a trivial change that renames switchToRbacRole to
toggle_rbac_role.

This change is needed because:
  - switchToRbacRole is camel case which is inconsistent with
    all the snake-case variables names throughout Patrole and
    OpenStack
  - It violates Python's naming conventions [0].

[0] See pep8 styling guideline:

"Function names should be lowercase, with words separated
by underscores as necessary to improve readability. mixedCase
is allowed only in contexts where that's already the prevailing
style."

And for variable names:

"Use the function naming rules: lowercase with words separated
by underscores as necessary to improve readability."

Change-Id: Ib6dd50ba02c25d585e2ca0c9383771f9337212b8
Depends-On: Ie1c4b6a2801f10c8e83f6d3f88fe0364d69317fa
2017-04-07 16:56:57 +00:00
Jeremy Liu 78b192553a Fix check-uuid not working
'check-uuid' and 'check-uuid --fix' are not working because we do not
set package name for them. This patch fixes that.

Change-Id: I553c364e3fc0d640620a01046dd7f70bdb704be2
Closes-Bug: #1678407
2017-04-02 06:50:04 +00:00
raiesmh08 8590c0c628 Removal of re-switching of rbac-role from tearDown
Currently, for every test case class, we need to add
re-switching rbac role in tearDown method. Thus for
every testcase using the tearDown method becomes
mandatory.

This patch removes tearDown dependency for re-switching
rbac-role.

Co-Authored-By: Mh Raies <mh.raies@ericsson.com>
Co-Authored-By: Felipe Monteiro <felipe.monteiro@att.com>

Implements: blueprint refactor-teardown-switch-roles
Change-Id: I3f0026533255c87b8128f2bf3a4aa488382a2523
2017-03-14 15:08:46 -04:00
Felipe Monteiro 34a138c4b5 Refactors Patrole framework to only use admin tenant credential type.
This patch adds following capablities to RBAC tempest framework:

1. Restricts admin only tenant to be used for rbac as much as possible,
   and thus removes need of creating additional tenant with "primary"
   credential type.
2. Patrole framework requires "tempest_roles" value in the conf file
   to be set to "admin" role. Which again restricts tempest.conf to a
   hardcoded value. This patch takes care of this problem also.

Note: Adding this patch will required some cleanup and refactoring in
test files, which will be taken care in separate commits component wise.

Co-Authored-By: Mh Raies <mh.raies@ericsson.com>
Co-Authored-By: Felipe Monteiro <felipe.monteiro@att.com>

Implements bp: modifying-switching-role-mechanism
Closes-Bug: #1664600
Closes-Bug: #1664278

Change-Id: Ic665d35332def6b6ec7b0065d1ebe65514a926b9
2017-03-02 17:04:56 -05:00
Felipe Monteiro 5b9ff758e3 Compute API Deferred Delete Tests
Adds test for deferred delete policy action [0].

[0] https://github.com/openstack/nova/blob/master/nova/policies/deferred_delete.py

Change-Id: If8d5f136494fe1d565adfaf432470e3cfc8c9c2a
Partially-Implements: blueprint initial-tests-compute
2017-02-22 02:11:39 +00:00