3406d96c6c
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
62 lines
2.0 KiB
Diff
62 lines
2.0 KiB
Diff
From 4dd1cca9449f612c35891c58f9293491135074ad Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
|
|
Date: Wed, 9 Mar 2016 13:08:22 +0100
|
|
Subject: [PATCH 1/2] [live-media] Support release set to None globally
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
|
|
---
|
|
pungi/phases/livemedia_phase.py | 2 +-
|
|
tests/test_livemediaphase.py | 20 ++++++++++++++++++++
|
|
2 files changed, 21 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/pungi/phases/livemedia_phase.py b/pungi/phases/livemedia_phase.py
|
|
index 1060317..c5f3ec2 100644
|
|
--- a/pungi/phases/livemedia_phase.py
|
|
+++ b/pungi/phases/livemedia_phase.py
|
|
@@ -35,7 +35,7 @@ class LiveMediaPhase(PhaseBase):
|
|
},
|
|
{
|
|
"name": "live_media_release",
|
|
- "expected_types": [str],
|
|
+ "expected_types": [str, type(None)],
|
|
"optional": True,
|
|
}
|
|
)
|
|
diff --git a/tests/test_livemediaphase.py b/tests/test_livemediaphase.py
|
|
index 20ccdfc..493ffe2 100755
|
|
--- a/tests/test_livemediaphase.py
|
|
+++ b/tests/test_livemediaphase.py
|
|
@@ -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, {
|
|
--
|
|
2.5.0
|
|
|