Files
fm-orchestrator/tests/integration/test_no_components.py
Mariana Ulaieva a5f6d8f136 Factor out packaging utility
Until now, it was assumed that the module-build command returned only
one build, so it was only one build_id. However, it is possible that
the module-build command will build more than one builds and therefore
a list of build_ids is needed. Also is needed to watch and cancel more
than one build.
For this reason run, watch, and cancel methods are methods of the
PackagingUtility class instead of Build class.  Run method returns list
of Build objects instead of build_id. And it's also possible to cancel
and to watch on all generated module builds.
2020-01-23 14:26:46 +01:00

23 lines
574 B
Python

# -*- coding: utf-8 -*-
# SPDX-License-Identifier: MIT
def test_no_components(pkg_util, 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
"""
repo.bump()
builds = pkg_util.run(reuse=scenario.get("build_id"))
assert len(builds) == 1
pkg_util.watch(builds)
build = builds[0]
assert build.state_name == "ready"
assert not build.data["component_builds"]