mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-09 16:14:59 +08:00
Keep the 'module_name:[]' in requires unexpanded in generate_expanded_mmds.
This commit is contained in:
@@ -279,7 +279,7 @@ def generate_expanded_mmds(session, mmd, raise_if_stream_ambigous=False, default
|
||||
# Each generated MMD must be new Module object...
|
||||
# TODO: Use copy method once its in released libmodulemd:
|
||||
# https://github.com/fedora-modularity/libmodulemd/pull/20
|
||||
mmd_copy = Modulemd.Module.new_from_string(current_mmd.dumps())
|
||||
mmd_copy = Modulemd.Module.new_from_string(mmd.dumps())
|
||||
xmd = glib.from_variant_dict(mmd_copy.get_xmd())
|
||||
|
||||
# Requires contain the NSVC representing the input mmd.
|
||||
|
||||
@@ -213,6 +213,14 @@ class TestUtilsModuleStreamExpansion:
|
||||
set([
|
||||
frozenset(['gtk:1'])
|
||||
])),
|
||||
|
||||
({"gtk": []}, {"gtk": ["1"]}, True,
|
||||
set([
|
||||
frozenset(['gtk:1:0:c2', 'platform:f28:0:c10'])
|
||||
]),
|
||||
set([
|
||||
frozenset(['gtk:1'])
|
||||
])),
|
||||
])
|
||||
def test_generate_expanded_mmds_buildrequires(
|
||||
self, requires, build_requires, stream_ambigous, expected_xmd,
|
||||
@@ -293,6 +301,11 @@ class TestUtilsModuleStreamExpansion:
|
||||
frozenset(['foo:1', 'gtk:1']),
|
||||
])),
|
||||
|
||||
({"gtk": [], "foo": []}, {"gtk": ["1"], "foo": ["1"]},
|
||||
set([
|
||||
frozenset([]),
|
||||
])),
|
||||
|
||||
])
|
||||
def test_generate_expanded_mmds_requires(self, requires, build_requires, expected):
|
||||
self._generate_default_modules()
|
||||
|
||||
Reference in New Issue
Block a user