From 2e1105cea5c742ff86acc9e923fead46ca41b1b4 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Tue, 15 Jun 2021 17:02:12 +0000 Subject: [PATCH] test/ostree: add v2 tarball build Build the ostree commit wrapped in a tarball added in the previous commit. --- test/run/test_ostree.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/run/test_ostree.py b/test/run/test_ostree.py index 5da187a3..725441e3 100644 --- a/test/run/test_ostree.py +++ b/test/run/test_ostree.py @@ -26,6 +26,22 @@ def testdata_fixture(): return test.TestBase.locate_test_data() +@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") +def test_ostree_tarball(osb, tmpdir, testdata): + + # Build a container + manifest = os.path.join(testdata, + "manifests/fedora-ostree-tarball.json") + osb.compile_file(manifest, + output_dir=tmpdir, + checkpoints=["build", "ostree-tree", "ostree-commit"], + exports=["tarball"]) + + tarball = os.path.join(tmpdir, "tarball", "fedora-commit.tar") + assert os.path.exists(tarball) + + @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") def test_ostree_container(osb, tmpdir, testdata):