diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-08-24 17:16:32 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-08-24 17:16:32 -0400 |
commit | f19d5701fe34374f674d7fd334184d51aae061c4 (patch) | |
tree | 2dc8b5f28da227a825adc0851c9376e594384d05 | |
parent | c883c28c8abd00e9681ddcee97ac2f1ab5b33883 (diff) | |
download | vyos-cloud-init-f19d5701fe34374f674d7fd334184d51aae061c4.tar.gz vyos-cloud-init-f19d5701fe34374f674d7fd334184d51aae061c4.zip |
fix test case for copy of uuid -> instance-id
-rw-r--r-- | tests/unittests/test_datasource/test_configdrive.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/unittests/test_datasource/test_configdrive.py b/tests/unittests/test_datasource/test_configdrive.py index 50b97ef8..55573114 100644 --- a/tests/unittests/test_datasource/test_configdrive.py +++ b/tests/unittests/test_datasource/test_configdrive.py @@ -79,8 +79,11 @@ class TestConfigDriveDataSource(TestCase): found = ds.read_config_drive_dir(self.tmp) + expected_md = copy(OSTACK_META) + expected_md['instance-id'] = expected_md['uuid'] + self.assertEqual(USER_DATA, found['userdata']) - self.assertEqual(OSTACK_META, found['metadata']) + self.assertEqual(expected_md, found['metadata']) self.assertEqual(found['files']['/etc/foo.cfg'], CONTENT_0) self.assertEqual(found['files']['/etc/bar/bar.cfg'], CONTENT_1) @@ -94,7 +97,11 @@ class TestConfigDriveDataSource(TestCase): populate_dir(self.tmp, data) found = ds.read_config_drive_dir(self.tmp) - self.assertEqual(OSTACK_META, found['metadata']) + + expected_md = copy(OSTACK_META) + expected_md['instance-id'] = expected_md['uuid'] + + self.assertEqual(expected_md, found['metadata']) def test_seed_dir_bad_json_metadata(self): """Verify that bad json in metadata raises BrokenConfigDriveDir.""" |