summaryrefslogtreecommitdiff
path: root/tests/cloud_tests
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2018-01-08 09:43:44 -0800
committerScott Moser <smoser@ubuntu.com>2018-01-09 10:07:48 -0500
commitdf24daa833d7eb88e7c172eb5d7f257766adb0e3 (patch)
treedbe4fa76c17e6dfd187e7d4bde200819d34dac09 /tests/cloud_tests
parent72270e8c311efc8b9ba8bb92492d8728d84bd9f2 (diff)
downloadvyos-cloud-init-df24daa833d7eb88e7c172eb5d7f257766adb0e3.tar.gz
vyos-cloud-init-df24daa833d7eb88e7c172eb5d7f257766adb0e3.zip
tests: update apt sources list test
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.
Diffstat (limited to 'tests/cloud_tests')
-rw-r--r--tests/cloud_tests/testcases/modules/apt_configure_sources_list.py5
-rw-r--r--tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml6
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 129d2264..cf84e056 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 143cb080..87e470c1 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