From 8cb8502cc1c99ec787e23504cf4e9f60c01bf0fe Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Tue, 10 May 2016 15:30:49 +0200 Subject: add test_apt_source_ppa (failing for now) --- .../test_handler/test_handler_apt_source.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests/unittests/test_handler') diff --git a/tests/unittests/test_handler/test_handler_apt_source.py b/tests/unittests/test_handler/test_handler_apt_source.py index a9647156..22a4accf 100644 --- a/tests/unittests/test_handler/test_handler_apt_source.py +++ b/tests/unittests/test_handler/test_handler_apt_source.py @@ -103,4 +103,25 @@ class TestAptSourceConfig(TestCase): "multiverse"), contents, flags=re.IGNORECASE)) + + def test_apt_source_ppa(self): + """ test_apt_source_ppa + Test specification of a ppa + """ + params = self._get_default_params() + cfg = {'source': 'ppa:smoser/cloud-init-test', + 'filename': self.aptlistfile} + + cc_apt_configure.add_sources([cfg], params) + + self.assertTrue(os.path.isfile(self.aptlistfile)) + + # report content before making regex + # FAIL ? goes in "untranslated" + # should become e.g. deb http://ppa.launchpad.net/smoser/cloud-init-test/ubuntu xenial main + contents = load_tfile_or_url(self.aptlistfile) + print(contents) + self.assertTrue(1 == 2) + + # vi: ts=4 expandtab -- cgit v1.2.3