Add test_static_context

This commit is contained in:
jobrauer
2020-09-10 11:02:12 +02:00
parent 107fe1cc9e
commit e9df47d80c
2 changed files with 15 additions and 0 deletions

View File

@@ -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

View File

@@ -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