summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-09-19 14:28:39 -0400
committerScott Moser <smoser@brickies.net>2017-09-19 14:30:43 -0400
commit7a2d4cc8bfbbc3b4386cee6333a966acd09e9c74 (patch)
tree57ada152e8cb2cad4c036f004469cc3ae60555fd /tests
parent7eb3460b0d6d3e362a246958a7ea0a9ee5d91d5e (diff)
downloadvyos-cloud-init-7a2d4cc8bfbbc3b4386cee6333a966acd09e9c74.tar.gz
vyos-cloud-init-7a2d4cc8bfbbc3b4386cee6333a966acd09e9c74.zip
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_ds_identify.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unittests/test_ds_identify.py b/tests/unittests/test_ds_identify.py
index 92454d7c..1284e755 100644
--- a/tests/unittests/test_ds_identify.py
+++ b/tests/unittests/test_ds_identify.py
@@ -31,6 +31,7 @@ POLICY_FOUND_ONLY = "search,found=all,maybe=none,notfound=disabled"
POLICY_FOUND_OR_MAYBE = "search,found=all,maybe=all,notfound=disabled"
DI_DEFAULT_POLICY = "search,found=all,maybe=all,notfound=enabled"
DI_DEFAULT_POLICY_NO_DMI = "search,found=all,maybe=all,notfound=disabled"
+DI_EC2_STRICT_ID_DEFAULT = "true"
SHELL_MOCK_TMPL = """\
%(name)s() {
@@ -62,7 +63,8 @@ class TestDsIdentify(CiTestCase):
def call(self, rootd=None, mocks=None, args=None, files=None,
policy_dmi=DI_DEFAULT_POLICY,
- policy_no_dmi=DI_DEFAULT_POLICY_NO_DMI):
+ policy_no_dmi=DI_DEFAULT_POLICY_NO_DMI,
+ ec2_strict_id=DI_EC2_STRICT_ID_DEFAULT):
if args is None:
args = []
if mocks is None:
@@ -89,6 +91,7 @@ class TestDsIdentify(CiTestCase):
". " + self.dsid_path,
'DI_DEFAULT_POLICY="%s"' % policy_dmi,
'DI_DEFAULT_POLICY_NO_DMI="%s"' % policy_no_dmi,
+ 'DI_EC2_STRICT_ID_DEFAULT="%s"' % ec2_strict_id,
""
]