From 03539b7f8b82f0b2a9ea041927e88dd56af01e4f Mon Sep 17 00:00:00 2001 From: Brian Rosmaita Date: Fri, 22 Mar 2019 12:46:57 -0400 Subject: [PATCH] Separate out configuration tests Following up on an #action from the weekly Glance meeting: http://eavesdrop.openstack.org/meetings/glance/2019/glance.2019-01-31-13.59.log.html#l-134 Change-Id: Ic9b8c4c055345b0128ab1c8dbfabac3f20e326b6 --- .zuul.yaml | 20 +++++++++++++++++++ glance/tests/gate/README | 11 ++++++++++ glance/tests/gate/__init__.py | 0 .../test_data_migration_version.py | 0 tox.ini | 12 +++++++++++ 5 files changed, 43 insertions(+) create mode 100644 glance/tests/gate/README create mode 100644 glance/tests/gate/__init__.py rename glance/tests/{unit => gate}/test_data_migration_version.py (100%) diff --git a/.zuul.yaml b/.zuul.yaml index 6cd1515d5e..bc45461e68 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -29,6 +29,25 @@ - ^tox.ini$ - ^\.zuul\.yaml$ +- job: + name: glance-code-constants-check + parent: tox + description: | + Tests to catch when code constants have gotten out of sync. + vars: + tox_envlist: gateonly + irrelevant-files: + - ^(test-|)requirements.txt$ + - ^lower-constraints.txt$ + - ^.*\.rst$ + - ^api-ref/.*$ + - ^doc/.*$ + - ^etc/.*$ + - ^releasenotes/.*$ + - ^setup.cfg$ + - ^tox.ini$ + - ^\.zuul\.yaml$ + - job: name: glance-tox-oslo-tips-base parent: tox @@ -217,6 +236,7 @@ - openstack-tox-functional-py35 - glance-eventlet-ssl-handshake-broken-py35: voting: false + - glance-code-constants-check - devstack-plugin-ceph-tempest: voting: false irrelevant-files: diff --git a/glance/tests/gate/README b/glance/tests/gate/README new file mode 100644 index 0000000000..05636e9aca --- /dev/null +++ b/glance/tests/gate/README @@ -0,0 +1,11 @@ +=============== +Gate-only tests +=============== + +These tests catch configuration problems for some code constants that +must be maintained manually. We have them separated out from the other +tests so that they can easily be run in their own gate job and don't +affect local development. + +It would be nice if someone with some free time could figure out how +to make these changes automatic (or unnecessary) ... diff --git a/glance/tests/gate/__init__.py b/glance/tests/gate/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/glance/tests/unit/test_data_migration_version.py b/glance/tests/gate/test_data_migration_version.py similarity index 100% rename from glance/tests/unit/test_data_migration_version.py rename to glance/tests/gate/test_data_migration_version.py diff --git a/tox.ini b/tox.ini index 8692ec68a2..3555951dcb 100644 --- a/tox.ini +++ b/tox.ini @@ -76,6 +76,18 @@ setenv = commands = stestr run --whitelist-file ./broken-functional-py35-ssl-tests.txt {posargs} +[testenv:gateonly] +# NOTE(rosmaita): these tests catch configuration problems for some code +# constants that must be maintained manually; we have them separated out +# so they don't affect local development +# TODO(someone other than me): figure out how to make these changes either +# automatic or unnecessary +basepython = python3 +setenv = + TEST_PATH = ./glance/tests/gate +commands = + stestr run {posargs} + [testenv:pep8] basepython = python3 commands =