test: add a test for the ostree.commit assembler
Create a ostree commit and check that it successfully was created by inspecting the resulting `compose.json`.
This commit is contained in:
parent
5a54dfcf9f
commit
da80259ea0
3 changed files with 1189 additions and 0 deletions
|
|
@ -99,6 +99,23 @@ class TestAssemblers(test.TestBase):
|
|||
self.assertImageFile(image, "raw", options["size"])
|
||||
self.assertFilesystem(image, options["root_fs_uuid"], "ext4", tree)
|
||||
|
||||
@unittest.skipUnless(test.TestBase.have_tree_diff(), "tree-diff missing")
|
||||
def test_ostree(self):
|
||||
with self.osbuild as osb:
|
||||
with open(os.path.join(self.locate_test_data(),
|
||||
"manifests/fedora-ostree-commit.json")) as f:
|
||||
manifest = json.load(f)
|
||||
|
||||
data = json.dumps(manifest)
|
||||
osb.compile(data)
|
||||
with osb.map_output("compose.json") as filename:
|
||||
with open(filename) as f:
|
||||
compose = json.load(f)
|
||||
commit_id = compose["ostree-commit"]
|
||||
ref = compose["ref"]
|
||||
assert commit_id
|
||||
assert ref
|
||||
|
||||
@unittest.skipUnless(test.TestBase.have_tree_diff(), "tree-diff missing")
|
||||
def test_qemu(self):
|
||||
loctl = loop.LoopControl()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue