diff --git a/.zuul.yaml b/.zuul.yaml index f47655f878..04836e2fea 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,21 +1,3 @@ -- 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$ - - ^.*\.rst$ - - ^api-ref/.*$ - - ^doc/.*$ - - ^etc/.*$ - - ^releasenotes/.*$ - - ^setup.cfg$ - - ^tox.ini$ - - ^\.zuul\.yaml$ - - job: name: glance-tox-oslo-tips-base parent: tox @@ -321,7 +303,6 @@ - openstack-tox-functional-py38-fips - openstack-tox-functional-py39 - glance-tox-functional-py39-rbac-defaults - - glance-code-constants-check - glance-ceph-thin-provisioning: voting: false irrelevant-files: &tempest-irrelevant-files diff --git a/glance/tests/gate/README b/glance/tests/gate/README deleted file mode 100644 index 05636e9aca..0000000000 --- a/glance/tests/gate/README +++ /dev/null @@ -1,11 +0,0 @@ -=============== -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 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/glance/tests/gate/test_data_migration_version.py b/glance/tests/gate/test_data_migration_version.py deleted file mode 100644 index 992e89001f..0000000000 --- a/glance/tests/gate/test_data_migration_version.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import testtools - -from glance.db.migration import CURRENT_RELEASE -from glance.version import version_info - - -class TestDataMigrationVersion(testtools.TestCase): - - def test_migration_version(self): - """Make sure the data migration version info has been updated.""" - - release_number = int(version_info.version_string().split('.', 1)[0]) - - # by rule, release names must be composed of the 26 letters of the - # ISO Latin alphabet (ord('A')==65, ord('Z')==90) - release_letter = str(CURRENT_RELEASE[:1].upper()).encode('ascii') - - # Convert release letter into an int in [1:26]. The first - # glance release was 'Bexar'. - converted_release_letter = (ord(release_letter) - - ord(u'B'.encode('ascii')) + 1) - - # Project the release number into [1:26] - converted_release_number = release_number % 26 - - # Prepare for the worst with a super-informative message - msg = ('\n\n' - 'EMERGENCY!\n' - 'glance.db.migration.CURRENT_RELEASE is out of sync ' - 'with the glance version.\n' - ' CURRENT_RELEASE: %s\n' - ' glance version: %s\n' - 'glance.db.migration.CURRENT_RELEASE needs to be ' - 'updated IMMEDIATELY.\n' - 'The gate will be wedged until the update is made.\n' - 'EMERGENCY!\n' - '\n') % (CURRENT_RELEASE, - version_info.version_string()) - - self.assertEqual(converted_release_letter, - converted_release_number, - msg) diff --git a/tox.ini b/tox.ini index 75e5975089..b1a0ea9c70 100644 --- a/tox.ini +++ b/tox.ini @@ -67,17 +67,6 @@ basepython = python3 commands = oslopolicy-sample-generator --config-file=etc/glance-policy-generator.conf -[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 -setenv = - TEST_PATH = ./glance/tests/gate -commands = - stestr run {posargs} - [testenv:pep8] commands = flake8 {posargs}