diff --git a/tests/integration/example.test.env.yaml b/tests/integration/example.test.env.yaml index 420eab7b..37d37770 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 00000000..ff74c231 --- /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