Split protection unit tests into its own job

There are so many protection tests now, and for the moment they are so
inefficient, that running them all as part of our main unit test suite
for py27, py36, py37, and cover jobs yields a high rate of timeouts
which reduces our own development velocity and negatively impacts every
project that co-gates with keystone. This change splits the protection
tests into their own level of tests outside of the configured stestr
test_path and adds a separate tox environment and zuul job to run just
the protection tests on their own. Parallelizing these tests should help
alleviate the timeout issue while we work on making these tests more
efficient.

Change-Id: Ibb12053bd6864a153f7e3998dbd008b6eec4295b
This commit is contained in:
Colleen Murphy 2019-09-06 17:25:19 -07:00
parent 18e0080af3
commit 5e35efd55f
28 changed files with 17 additions and 1 deletions

View File

@ -68,6 +68,14 @@
tox_env: upgrade
osa_test_repo: openstack/openstack-ansible-os_keystone
- job:
name: keystone-tox-protection
parent: openstack-tox-py37
vars:
tox_envlist: protection
bindep_profile: test py37
python_version: 3.7
# Experimental
- job:
name: keystone-tox-patch_cover
@ -211,6 +219,7 @@
irrelevant-files: *tempest-irrelevant-files
- tempest-ipv6-only:
irrelevant-files: *tempest-irrelevant-files
- keystone-tox-protection
gate:
jobs:
# Override tox timeouts
@ -236,6 +245,7 @@
irrelevant-files: *tempest-irrelevant-files
- tempest-ipv6-only:
irrelevant-files: *tempest-irrelevant-files
- keystone-tox-protection
experimental:
jobs:
- keystone-tox-patch_cover

View File

@ -1,7 +1,7 @@
[tox]
minversion = 2.5.0
skipsdist = True
envlist = py27,py37,pep8,api-ref,docs,genconfig,genpolicy,releasenotes
envlist = py27,py37,pep8,api-ref,docs,genconfig,genpolicy,releasenotes,protection
[testenv]
usedevelop = True
@ -196,3 +196,9 @@ deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
.[ldap,memcache,mongodb]
[testenv:protection]
basepython = python3
commands =
find keystone -type f -name "*.pyc" -delete
stestr run --test-path=./keystone/tests/protection {posargs}