mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-03-24 14:01:03 +08:00
28 lines
1.0 KiB
Python
28 lines
1.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
import utils
|
|
|
|
|
|
def test_failed_build(test_env, repo, koji):
|
|
"""
|
|
Run a scratch build with "rebuild_strategy=all".
|
|
|
|
Check that:
|
|
* Check that the module build eventually fails
|
|
* Check that any other components in the same batch as the failed component are
|
|
cancelled, if not completed.
|
|
"""
|
|
build = utils.Build(test_env["packaging_utility"], test_env["mbs_api"])
|
|
build.run("--watch", "--scratch", "--optional", "rebuild_strategy=all")
|
|
|
|
assert build.state_name == "failed"
|
|
batch = test_env["testdata"]["failed_build"]["batch"]
|
|
failing_components = test_env["testdata"]["failed_build"]["failing_components"]
|
|
canceled_components = test_env["testdata"]["failed_build"]["canceled_components"]
|
|
assert sorted(failing_components) == sorted(build.components(state="FAILED", batch=batch))
|
|
assert sorted(canceled_components) == sorted(
|
|
build.components(state="COMPLETE", batch=batch)
|
|
+ build.components(state="CANCELED", batch=batch)
|
|
)
|