summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/cloud_tests/testcases/modules/apt_configure_primary.py14
-rw-r--r--tests/cloud_tests/testcases/modules/apt_configure_primary.yaml7
2 files changed, 9 insertions, 12 deletions
diff --git a/tests/cloud_tests/testcases/modules/apt_configure_primary.py b/tests/cloud_tests/testcases/modules/apt_configure_primary.py
index c1c4bbc0..4950a2ef 100644
--- a/tests/cloud_tests/testcases/modules/apt_configure_primary.py
+++ b/tests/cloud_tests/testcases/modules/apt_configure_primary.py
@@ -9,12 +9,16 @@ class TestAptconfigurePrimary(base.CloudTestCase):
def test_ubuntu_sources(self):
"""Test no default Ubuntu entries exist."""
- out = self.get_data_file('ubuntu.sources.list')
- self.assertEqual(0, int(out))
+ out = self.get_data_file('sources.list')
+ ubuntu_source_count = len(
+ [line for line in out.split('\n') if 'archive.ubuntu.com' in line])
+ self.assertEqual(0, ubuntu_source_count)
def test_gatech_sources(self):
- """Test GaTech entires exist."""
- out = self.get_data_file('gatech.sources.list')
- self.assertEqual(20, int(out))
+ """Test GaTech entries exist."""
+ out = self.get_data_file('sources.list')
+ gatech_source_count = len(
+ [line for line in out.split('\n') if 'gtlib.gatech.edu' in line])
+ self.assertGreater(gatech_source_count, 0)
# vi: ts=4 expandtab
diff --git a/tests/cloud_tests/testcases/modules/apt_configure_primary.yaml b/tests/cloud_tests/testcases/modules/apt_configure_primary.yaml
index 41bcf2fd..cc067d4f 100644
--- a/tests/cloud_tests/testcases/modules/apt_configure_primary.yaml
+++ b/tests/cloud_tests/testcases/modules/apt_configure_primary.yaml
@@ -12,13 +12,6 @@ cloud_config: |
- default
uri: "http://www.gtlib.gatech.edu/pub/ubuntu-releases/"
collect_scripts:
- ubuntu.sources.list: |
- #!/bin/bash
- grep -v '^#' /etc/apt/sources.list | sed '/^\s*$/d' | grep -c archive.ubuntu.com
- gatech.sources.list: |
- #!/bin/bash
- grep -v '^#' /etc/apt/sources.list | sed '/^\s*$/d' | grep -c gtlib.gatech.edu
-
sources.list: |
#!/bin/bash
cat /etc/apt/sources.list