From c35fe26e732a1d727e6afca0e931f7d8694e35d4 Mon Sep 17 00:00:00 2001 From: Mariana Ulaieva Date: Thu, 12 Dec 2019 11:05:56 +0100 Subject: [PATCH] No components integration test Implement the Module With No Components integration test. --- tests/integration/example.test.env.yaml | 3 +++ tests/integration/test_no_components.py | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/integration/test_no_components.py diff --git a/tests/integration/example.test.env.yaml b/tests/integration/example.test.env.yaml index 6d450f2f..60a0fea5 100644 --- a/tests/integration/example.test.env.yaml +++ b/tests/integration/example.test.env.yaml @@ -61,3 +61,6 @@ testdata: package: acl # Name of the branch which is going to be built for the specified package. component_branch: private-test-reuse-components + no_components: + module: testmodule + branch: test-no-components-branch diff --git a/tests/integration/test_no_components.py b/tests/integration/test_no_components.py new file mode 100644 index 00000000..ef5756c6 --- /dev/null +++ b/tests/integration/test_no_components.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# SPDX-License-Identifier: MIT + +import utils + + +def test_no_components(test_env, 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=test_env["testdata"]["no_components"].get("build_id")) + build.watch() + + assert build.state_name == "ready" + assert not build.data["component_builds"]