test/ostree: add v2 tarball build

Build the ostree commit wrapped in a tarball added in the previous
commit.
This commit is contained in:
Christian Kellner 2021-06-15 17:02:12 +00:00
parent 5614520fcb
commit 2e1105cea5

View file

@ -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):