From 2129f3d68bc92f1a06e730e44ae8bd7b36927da9 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Thu, 2 Dec 2021 20:34:34 +0000 Subject: [PATCH] test/osbuild: add order check for on_demand Add a check that ensures the order of inputs to `depsolve` is preserved in the result. --- test/mod/test_osbuild.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/mod/test_osbuild.py b/test/mod/test_osbuild.py index 2e6b4059..4dae3efe 100644 --- a/test/mod/test_osbuild.py +++ b/test/mod/test_osbuild.py @@ -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)