compose: Search all nested variants

The code to search for install tree and repo for image-build and
live-media was only looking at top-level variants. Addons, optional or
integrated layered products could not have been found. This would lead
to error messages such as "There is no variant Server-optional to get
repo from when building live image for Client" even though the variant
exists.

Various tests are updated to exercise this edge case.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-11-09 10:20:55 +01:00
parent 4427769f6a
commit bd00920c62
10 changed files with 32 additions and 16 deletions

View file

@ -326,12 +326,12 @@ class TestLiveMediaPhase(PungiTestCase):
'scratch': True,
'skip_tag': True,
'title': 'Custom Title',
'repo_from': ['Everything'],
'repo_from': ['Everything', 'Server-optional'],
'repo': ['http://example.com/extra_repo'],
'arches': ['x86_64'],
'ksversion': '24',
'release': None,
'install_tree_from': 'Everything',
'install_tree_from': 'Server-optional',
'subvariant': 'Something',
'failable': ['*'],
}
@ -359,12 +359,13 @@ class TestLiveMediaPhase(PungiTestCase):
'release': '20151203.t.0',
'repo': ['http://example.com/extra_repo',
self.topdir + '/compose/Everything/$basearch/os',
self.topdir + '/compose/Server-optional/$basearch/os',
self.topdir + '/compose/Server/$basearch/os'],
'scratch': True,
'skip_tag': True,
'target': 'f24',
'title': 'Custom Title',
'install_tree': self.topdir + '/compose/Everything/$basearch/os',
'install_tree': self.topdir + '/compose/Server-optional/$basearch/os',
'version': '25',
'subvariant': 'Something',
'failable_arches': ['*'],