Merge ~powersj/cloud-init:cii-module-aptlist into cloud-init:master

Proposed by Joshua Powers
Status: Merged
Approved by: Scott Moser
Approved revision: 15d4a258d0499ba7e7268d985d3b814ca0f3dfa2
Merged at revision: df24daa833d7eb88e7c172eb5d7f257766adb0e3
Proposed branch: ~powersj/cloud-init:cii-module-aptlist
Merge into: cloud-init:master
Diff against target: 33 lines (+11/-0)
2 files modified
tests/cloud_tests/testcases/modules/apt_configure_sources_list.py (+5/-0)
tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml (+6/-0)
Reviewer Review Type Date Requested Status
Scott Moser Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+335854@code.launchpad.net

Commit message

tests: update apt sources list test

Ubuntu will pick in-cloud archive mirrors on EC2. That behavior would
cause the apt_configure_sources test to fail. It was not taking into
account platform specific mirrors nor was it checking that no additional
entries were added.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:15d4a258d0499ba7e7268d985d3b814ca0f3dfa2
https://jenkins.ubuntu.com/server/job/cloud-init-ci/676/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/676/rebuild

review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) :
review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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):
10 def test_sources_list(self):10 def test_sources_list(self):
11 """Test sources.list includes sources."""11 """Test sources.list includes sources."""
12 out = self.get_data_file('sources.list')12 out = self.get_data_file('sources.list')
13
14 # Verify we have 6 entires
15 self.assertEqual(6, len(out.rstrip().split('\n')))
16
17 # Verify the keys generated the list correctly
13 self.assertRegex(out, r'deb http:\/\/archive.ubuntu.com\/ubuntu '18 self.assertRegex(out, r'deb http:\/\/archive.ubuntu.com\/ubuntu '
14 '[a-z].* main restricted')19 '[a-z].* main restricted')
15 self.assertRegex(out, r'deb-src http:\/\/archive.ubuntu.com\/ubuntu '20 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:
7cloud_config: |7cloud_config: |
8 #cloud-config8 #cloud-config
9 apt:9 apt:
10 primary:
11 - arches: [default]
12 uri: http://archive.ubuntu.com/ubuntu
13 security:
14 - arches: [default]
15 uri: http://security.ubuntu.com/ubuntu
10 sources_list: |16 sources_list: |
11 deb $MIRROR $RELEASE main restricted17 deb $MIRROR $RELEASE main restricted
12 deb-src $MIRROR $RELEASE main restricted18 deb-src $MIRROR $RELEASE main restricted

Subscribers

People subscribed via source and target branches