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
1diff --git a/tests/cloud_tests/testcases/modules/apt_configure_sources_list.py b/tests/cloud_tests/testcases/modules/apt_configure_sources_list.py
2index 129d226..cf84e05 100644
3--- a/tests/cloud_tests/testcases/modules/apt_configure_sources_list.py
4+++ b/tests/cloud_tests/testcases/modules/apt_configure_sources_list.py
5@@ -10,6 +10,11 @@ class TestAptconfigureSourcesList(base.CloudTestCase):
6 def test_sources_list(self):
7 """Test sources.list includes sources."""
8 out = self.get_data_file('sources.list')
9+
10+ # Verify we have 6 entires
11+ self.assertEqual(6, len(out.rstrip().split('\n')))
12+
13+ # Verify the keys generated the list correctly
14 self.assertRegex(out, r'deb http:\/\/archive.ubuntu.com\/ubuntu '
15 '[a-z].* main restricted')
16 self.assertRegex(out, r'deb-src http:\/\/archive.ubuntu.com\/ubuntu '
17diff --git a/tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml b/tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml
18index 143cb08..87e470c 100644
19--- a/tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml
20+++ b/tests/cloud_tests/testcases/modules/apt_configure_sources_list.yaml
21@@ -7,6 +7,12 @@ required_features:
22 cloud_config: |
23 #cloud-config
24 apt:
25+ primary:
26+ - arches: [default]
27+ uri: http://archive.ubuntu.com/ubuntu
28+ security:
29+ - arches: [default]
30+ uri: http://security.ubuntu.com/ubuntu
31 sources_list: |
32 deb $MIRROR $RELEASE main restricted
33 deb-src $MIRROR $RELEASE main restricted

Subscribers

People subscribed via source and target branches