[live-media] Support release set to None globally
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
4bc126979b
commit
7e2cd28fb8
@ -35,7 +35,7 @@ class LiveMediaPhase(PhaseBase):
|
||||
},
|
||||
{
|
||||
"name": "live_media_release",
|
||||
"expected_types": [str],
|
||||
"expected_types": [str, type(None)],
|
||||
"optional": True,
|
||||
}
|
||||
)
|
||||
|
@ -14,6 +14,26 @@ from tests.helpers import DummyCompose, PungiTestCase
|
||||
|
||||
|
||||
class TestLiveMediaPhase(PungiTestCase):
|
||||
|
||||
def test_global_config_validation(self):
|
||||
compose = DummyCompose(self.topdir, {
|
||||
'live_media_ksurl': 'git://example.com/repo.git#HEAD',
|
||||
'live_media_target': 'f24',
|
||||
'live_media_release': 'RRR',
|
||||
'live_media_version': 'Rawhide',
|
||||
})
|
||||
|
||||
phase = LiveMediaPhase(compose)
|
||||
phase.validate()
|
||||
|
||||
def test_global_config_null_release(self):
|
||||
compose = DummyCompose(self.topdir, {
|
||||
'live_media_release': None,
|
||||
})
|
||||
|
||||
phase = LiveMediaPhase(compose)
|
||||
phase.validate()
|
||||
|
||||
@mock.patch('pungi.phases.livemedia_phase.ThreadPool')
|
||||
def test_live_media_minimal(self, ThreadPool):
|
||||
compose = DummyCompose(self.topdir, {
|
||||
|
Loading…
Reference in New Issue
Block a user