test/assemblers/ostree: check rpm-ostree.inputhash

Verify the rpm-ostree.input hash is set correctly for the repository
itself as well. This will in turn also verify that the repository
is existent and can be accessed.
This commit is contained in:
Christian Kellner 2020-06-10 15:10:44 +02:00 committed by Tom Gundersen
parent da80259ea0
commit 00f06dff16

View file

@ -113,8 +113,21 @@ class TestAssemblers(test.TestBase):
compose = json.load(f)
commit_id = compose["ostree-commit"]
ref = compose["ref"]
rpmostree_inputhash = compose["rpm-ostree-inputhash"]
assert commit_id
assert ref
assert rpmostree_inputhash
with osb.map_output("repo") as repo:
md = subprocess.check_output(
[
"ostree",
"show",
"--repo", repo,
"--print-metadata-key=rpmostree.inputhash",
commit_id
], encoding="utf-8").strip()
self.assertEqual(md, f"'{rpmostree_inputhash}'")
@unittest.skipUnless(test.TestBase.have_tree_diff(), "tree-diff missing")
def test_qemu(self):