mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-07 04:38:09 +08:00
Until now, to access the configuration of a scenario, the full path in
test_env had to be specified.
This might be cumbersome and error prone.
Create a scenario fixture, to make it easier to access the same
configuration.
Instead of
test_env["testdata"]["my_scenario"]["my_config"]
one can use the following:
scenario["my_config"]
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
23 lines
592 B
Python
23 lines
592 B
Python
# -*- coding: utf-8 -*-
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
import utils
|
|
|
|
|
|
def test_no_components(test_env, scenario, repo, koji):
|
|
"""
|
|
Submit the testmodule build with `fedpkg module-build`
|
|
|
|
Checks:
|
|
* Verify that no components were built when no components are defined in modulemd
|
|
* Verify that the testmodule build succeeds
|
|
|
|
"""
|
|
build = utils.Build(test_env["packaging_utility"], test_env["mbs_api"])
|
|
repo.bump()
|
|
build.run(reuse=scenario.get("build_id"))
|
|
build.watch()
|
|
|
|
assert build.state_name == "ready"
|
|
assert not build.data["component_builds"]
|