test/osbuild: add order check for on_demand

Add a check that ensures the order of inputs to `depsolve` is
preserved in the result.
This commit is contained in:
Christian Kellner 2021-12-02 20:34:34 +00:00 committed by Tom Gundersen
parent b8fb1ec1e9
commit 2129f3d68b

View file

@ -223,6 +223,15 @@ class TestDescriptions(unittest.TestCase):
res = manifest.depsolve(store, names(image))
assert res == names(build, rootfs, dep, image)
# ensure the order of inputs is preserved during
# the depsolving so that we build things in the
# same way they were requested
res = manifest.depsolve(store, names(ul, image))
assert res == names(build, dep, ul, rootfs, image)
res = manifest.depsolve(store, names(image, ul))
assert res == names(build, rootfs, dep, image, ul)
# if we have the 'dep' dependency in the store,
# we should be not be building that
store.have.add(dep.id)