diff options
| author | Joshua Powers <josh.powers@canonical.com> | 2018-01-08 17:43:44 (GMT) |
|---|---|---|
| committer | Scott Moser <smoser@ubuntu.com> | 2018-01-09 15:07:48 (GMT) |
| commit | df24daa833d7eb88e7c172eb5d7f257766adb0e3 (patch) | |
| tree | dbe4fa76c17e6dfd187e7d4bde200819d34dac09 | |
| parent | 72270e8c311efc8b9ba8bb92492d8728d84bd9f2 (diff) | |
Due to additional platforms getting added this test was not taking into
account platform specific mirrors nor was it checking that no additional
entries were added.
| -rw-r--r-- | tests/cloud_tests/testcases/modules/apt_configure_sources_list.py | 5 | ||||
| -rw-r--r-- | tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/cloud_tests/testcases/modules/apt_configure_sources_list.py b/tests/cloud_tests/testcases/modules/apt_configure_sources_list.py index 129d226..cf84e05 100644 --- a/tests/cloud_tests/testcases/modules/apt_configure_sources_list.py +++ b/tests/cloud_tests/testcases/modules/apt_configure_sources_list.py @@ -10,6 +10,11 @@ class TestAptconfigureSourcesList(base.CloudTestCase): def test_sources_list(self): """Test sources.list includes sources.""" out = self.get_data_file('sources.list') + + # Verify we have 6 entires + self.assertEqual(6, len(out.rstrip().split('\n'))) + + # Verify the keys generated the list correctly self.assertRegex(out, r'deb http:\/\/archive.ubuntu.com\/ubuntu ' '[a-z].* main restricted') self.assertRegex(out, r'deb-src http:\/\/archive.ubuntu.com\/ubuntu ' diff --git a/tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml b/tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml index 143cb08..87e470c 100644 --- a/tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml +++ b/tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml @@ -7,6 +7,12 @@ required_features: cloud_config: | #cloud-config apt: + primary: + - arches: [default] + uri: http://archive.ubuntu.com/ubuntu + security: + - arches: [default] + uri: http://security.ubuntu.com/ubuntu sources_list: | deb $MIRROR $RELEASE main restricted deb-src $MIRROR $RELEASE main restricted |
