From 78ddaa64546333d8ee80919df8111c1c547a349c Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 12 Oct 2022 14:47:01 -0600 Subject: [PATCH] test_locking: Tolerate CentOS Stream's versioning It's not a problem functionally, so explicitly allow it in the unit test. Signed-off-by: Zack Cerza --- teuthology/task/tests/test_locking.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/teuthology/task/tests/test_locking.py b/teuthology/task/tests/test_locking.py index 05b0f45ad3..0a4159d933 100644 --- a/teuthology/task/tests/test_locking.py +++ b/teuthology/task/tests/test_locking.py @@ -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): -- 2.39.5