diff options
author | Abhishek Kekane <akekane@redhat.com> | 2023-01-16 14:40:29 +0000 |
---|---|---|
committer | Abhishek Kekane <akekane@redhat.com> | 2023-01-16 14:40:29 +0000 |
commit | d07187f7107b02f42cfa335a22763cbb1c085587 (patch) | |
tree | 997a7bcbf4567475a97f4379d84b11b5c5e1e4f6 | |
parent | e9b40e1316b7e262887ddcb3d80067d5f7593540 (diff) | |
download | glance-d07187f7107b02f42cfa335a22763cbb1c085587.tar.gz |
Remove migration constant job and test
Since openstack release naming conventions has changed, current test
which check data migration version will not work as expected and same
is also blocking our gate. Removing this job and test to unblock the
gate.
NOTE: Going forward glance PTL/team needs to change the database
migration version without fail at the start of release cycle.
Change-Id: Idcb12a6c450d4ce4ee859e6e1f02fb71adf8c1d5
-rw-r--r-- | .zuul.yaml | 19 | ||||
-rw-r--r-- | glance/tests/gate/README | 11 | ||||
-rw-r--r-- | glance/tests/gate/__init__.py | 0 | ||||
-rw-r--r-- | glance/tests/gate/test_data_migration_version.py | 57 | ||||
-rw-r--r-- | tox.ini | 11 |
5 files changed, 0 insertions, 98 deletions
diff --git a/.zuul.yaml b/.zuul.yaml index f47655f87..04836e2fe 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,22 +1,4 @@ - 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 abstract: true @@ -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 05636e9ac..000000000 --- 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 e69de29bb..000000000 --- a/glance/tests/gate/__init__.py +++ /dev/null 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 992e89001..000000000 --- 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) @@ -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} |