Merge ~smoser/cloud-init:fix/tests-ds-identify-ec2-strict into cloud-init:master

Proposed by Scott Moser on 2017-09-19
Status: Merged
Merged at revision: 7a2d4cc8bfbbc3b4386cee6333a966acd09e9c74
Proposed branch: ~smoser/cloud-init:fix/tests-ds-identify-ec2-strict
Merge into: cloud-init:master
Diff against target: 29 lines (+4/-1)
1 file modified
tests/unittests/test_ds_identify.py (+4/-1)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve on 2017-09-19
Chad Smith 2017-09-19 Approve on 2017-09-19
Review via email: mp+331012@code.launchpad.net

Commit Message

tests: fix ds-identify unit tests to set EC2_STRICT_ID_DEFAULT.

The variable DI_EC2_STRICT_ID_DEFAULT was not being set in unit tests
so when 16.04 built, which changed that setting in patches the tests
would unexpectedly fail.

To post a comment you must log in.
Chad Smith (chad.smith) wrote :

+1 good find/fix

review: Approve

PASSED: Continuous integration, rev:7a2d4cc8bfbbc3b4386cee6333a966acd09e9c74
https://jenkins.ubuntu.com/server/job/cloud-init-ci/332/
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/332/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py
2index 92454d7..1284e75 100644
3--- a/tests/unittests/test_ds_identify.py
4+++ b/tests/unittests/test_ds_identify.py
5@@ -31,6 +31,7 @@ POLICY_FOUND_ONLY = "search,found=all,maybe=none,notfound=disabled"
6 POLICY_FOUND_OR_MAYBE = "search,found=all,maybe=all,notfound=disabled"
7 DI_DEFAULT_POLICY = "search,found=all,maybe=all,notfound=enabled"
8 DI_DEFAULT_POLICY_NO_DMI = "search,found=all,maybe=all,notfound=disabled"
9+DI_EC2_STRICT_ID_DEFAULT = "true"
10
11 SHELL_MOCK_TMPL = """\
12 %(name)s() {
13@@ -62,7 +63,8 @@ class TestDsIdentify(CiTestCase):
14
15 def call(self, rootd=None, mocks=None, args=None, files=None,
16 policy_dmi=DI_DEFAULT_POLICY,
17- policy_no_dmi=DI_DEFAULT_POLICY_NO_DMI):
18+ policy_no_dmi=DI_DEFAULT_POLICY_NO_DMI,
19+ ec2_strict_id=DI_EC2_STRICT_ID_DEFAULT):
20 if args is None:
21 args = []
22 if mocks is None:
23@@ -89,6 +91,7 @@ class TestDsIdentify(CiTestCase):
24 ". " + self.dsid_path,
25 'DI_DEFAULT_POLICY="%s"' % policy_dmi,
26 'DI_DEFAULT_POLICY_NO_DMI="%s"' % policy_no_dmi,
27+ 'DI_EC2_STRICT_ID_DEFAULT="%s"' % ec2_strict_id,
28 ""
29 ]
30

Subscribers

People subscribed via source and target branches

to all changes: