From e9df47d80c2aa0f716851132f9a861138894ba71 Mon Sep 17 00:00:00 2001 From: jobrauer Date: Sep 10 2020 13:27:21 +0000 Subject: Add test_static_context --- diff --git a/tests/integration/example.test.env.yaml b/tests/integration/example.test.env.yaml index 420eab7..37d3777 100644 --- a/tests/integration/example.test.env.yaml +++ b/tests/integration/example.test.env.yaml @@ -133,3 +133,6 @@ testdata: expected_reused: [0] expected_rebuilt: [1, 2] rebuild_strategy: "changed-and-after" + static_context: + module: testmodule + branch: test-static-context diff --git a/tests/integration/test_static_context.py b/tests/integration/test_static_context.py new file mode 100644 index 0000000..ff74c23 --- /dev/null +++ b/tests/integration/test_static_context.py @@ -0,0 +1,12 @@ + +def test_static_context(clone_and_start_build, mbs): + repo, builds = clone_and_start_build + + static_contexts = repo.modulemd["data"]["xmd"]["mbs_options"]["contexts"] + + assert len(builds) == len(static_contexts) + + for build in builds: + mbs.wait_for_module_build(build, lambda b: b.get("state") >= 0) + build = mbs.get_module_build(build) + assert build.get("context") in static_contexts