Skip to content

Commit

Permalink
Add test data for modulemd-packager-v3 src file [RHELDST-3923] (#45)
Browse files Browse the repository at this point in the history
Added module source file with packager-v3 format for tests.
Updated test for use this new test data.
  • Loading branch information
rbikar committed May 6, 2021
1 parent 12436b3 commit 6f3187b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
22 changes: 22 additions & 0 deletions tests/data/module_source/packager-modulemd.src.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
document: modulemd-packager
version: 3
data:
summary: A test module in all its beautiful beauty.
description: >-
A module for the demonstration of the metadata format. Also,
the obligatory lorem ipsum dolor sit amet goes right here.
configurations:
- context: testctx1
platform: el8.1.0.z
buildrequires:
testmodule: [test-reuse-tagged-module]
requires:
platform: el8.1.0.z
buildopts:
arches: [x86_64]
components:
rpms:
attr:
rationale: A build dependency of acl
ref: rhel-8.1.0
arches: [x86_64]
9 changes: 6 additions & 3 deletions tests/test_rpms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,13 +1025,16 @@ def test_unsupported_source_startup_error():
mock_options = MagicMock(koji=True, source="build_nvr.src.foo")
assert_that(calling(BaseProcessor).with_args(mock_options), raises(StartupError))


@pytest.mark.parametrize('source_module', [
'fake-nvr:modulemd.src.txt',
'fake-nvr:packager-modulemd.src.txt',
])
def test_stage_module_src(config_file, pushdir, lookasidedir, capsys, default_config,
mock_koji_session, mock_koji_pathinfo):
mock_koji_session, mock_koji_pathinfo, source_module):
"""Verify that alt-src command completes without any errors and generates
a commit for the given module source."""
branch = 'c7'
modulemd = 'fake-nvr:modulemd.src.txt'
modulemd = source_module

options = ['-v',
'-c', config_file,
Expand Down

0 comments on commit 6f3187b

Please sign in to comment.