]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
test_locking: Tolerate CentOS Stream's versioning
authorZack Cerza <zack@redhat.com>
Wed, 12 Oct 2022 20:47:01 +0000 (14:47 -0600)
committerZack Cerza <zack@redhat.com>
Wed, 6 Sep 2023 18:53:44 +0000 (12:53 -0600)
It's not a problem functionally, so explicitly allow it in the unit
test.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/task/tests/test_locking.py

index 05b0f45ad31b6f4d6debad2c765e447ebf18dc2a..0a4159d93369b5bf60f31e39d477b1faa8398a4e 100644 (file)
@@ -2,7 +2,6 @@ import pytest
 
 
 class TestLocking(object):
-
     def test_correct_os_type(self, ctx, config):
         os_type = ctx.config.get("os_type")
         if os_type is None:
@@ -17,6 +16,9 @@ class TestLocking(object):
         if ctx.config.get("os_type") == "debian":
             pytest.skip('known issue with debian versions; see: issue #10878')
         for remote in ctx.cluster.remotes.keys():
+            if ctx.config.get("os_type").lower() == "centos":
+                # CentOS Stream omits ".stream" in /etc/os-release
+                os_version = os_version.lower().replace(".stream", "", 1)
             assert remote.inventory_info['os_version'] == os_version
 
     def test_correct_machine_type(self, ctx, config):