From 5946a013ee342ca61d800f7fb0df507f79aa9f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Wed, 26 Apr 2023 16:52:11 +0200 Subject: [PATCH] Test: some tests depending on rpm-ostree were not checking its presence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add conditional skip to some tests that depend on rpm-ostree availability, but were not checking for its presence. These tests would previously fail if rpm-ostree is not available. They will be skipped now. Signed-off-by: Tomáš Hozza --- test/mod/test_util_ostree.py | 1 + test/run/test_assemblers.py | 1 + 2 files changed, 2 insertions(+) diff --git a/test/mod/test_util_ostree.py b/test/mod/test_util_ostree.py index f70e4889..375384af 100644 --- a/test/mod/test_util_ostree.py +++ b/test/mod/test_util_ostree.py @@ -91,6 +91,7 @@ class TestObjectStore(test.TestBase): self.assertEqual(v, js[p]) @unittest.skipUnless(test.TestBase.have_test_data(), "no test-data access") + @unittest.skipUnless(test.TestBase.have_rpm_ostree(), "rpm-ostree missing") def test_show_commit(self): repo_path = os.path.join(self.locate_test_data(), "sources/org.osbuild.ostree/data/repo") ostree.show(repo_path, "d6243b0d0ca3dc2aaef2e0eb3e9f1f4836512c2921007f124b285f7c466464d8") diff --git a/test/run/test_assemblers.py b/test/run/test_assemblers.py index 2cb8efe1..b33fe4fe 100644 --- a/test/run/test_assemblers.py +++ b/test/run/test_assemblers.py @@ -98,6 +98,7 @@ def test_rawfs(osbuild, fs_type): @pytest.mark.skipif(not test.TestBase.have_tree_diff(), reason="tree-diff missing") @pytest.mark.skipif(not test.TestBase.have_test_data(), reason="no test-data access") @pytest.mark.skipif(not test.TestBase.can_bind_mount(), reason="root-only") +@pytest.mark.skipif(not test.TestBase.have_rpm_ostree(), reason="rpm-ostree missing") def test_ostree(osbuild): with osbuild as osb: with open(os.path.join(test.TestBase.locate_test_data(),