test/assembler: check for ostree version metadata
Set the OS version of the commit via the new `os_version` option and make sure that it is in the compose info as well as in the commit metadata.
This commit is contained in:
parent
b89ef5aa5e
commit
fdded58cdd
3 changed files with 16 additions and 2 deletions
|
|
@ -682,7 +682,8 @@
|
|||
"assembler": {
|
||||
"name": "org.osbuild.ostree.commit",
|
||||
"options": {
|
||||
"ref": "fedora/x86_64/osbuild"
|
||||
"ref": "fedora/x86_64/osbuild",
|
||||
"os_version": "32"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@
|
|||
"assembler": {
|
||||
"name": "org.osbuild.ostree.commit",
|
||||
"options": {
|
||||
"ref": "fedora/x86_64/osbuild"
|
||||
"ref": "fedora/x86_64/osbuild",
|
||||
"os_version": "32"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,9 +127,11 @@ class TestAssemblers(test.TestBase):
|
|||
commit_id = compose["ostree-commit"]
|
||||
ref = compose["ref"]
|
||||
rpmostree_inputhash = compose["rpm-ostree-inputhash"]
|
||||
os_version = compose["ostree-version"]
|
||||
assert commit_id
|
||||
assert ref
|
||||
assert rpmostree_inputhash
|
||||
assert os_version
|
||||
|
||||
md = subprocess.check_output(
|
||||
[
|
||||
|
|
@ -141,6 +143,16 @@ class TestAssemblers(test.TestBase):
|
|||
], encoding="utf-8").strip()
|
||||
self.assertEqual(md, f"'{rpmostree_inputhash}'")
|
||||
|
||||
md = subprocess.check_output(
|
||||
[
|
||||
"ostree",
|
||||
"show",
|
||||
"--repo", repo,
|
||||
"--print-metadata-key=version",
|
||||
commit_id
|
||||
], encoding="utf-8").strip()
|
||||
self.assertEqual(md, f"'{os_version}'")
|
||||
|
||||
@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