summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-07-09 20:36:28 -0400
committerScott Moser <smoser@ubuntu.com>2013-07-09 20:36:28 -0400
commitec22feeefe309187107e0fb5471136f1c8a646c9 (patch)
tree0a2a3bf8255d266a1e4229a540ea5cf7d28d4eb3 /tests/unittests/test_datasource
parent950762bb008d25f529c71aae4c0b04f6b0134abb (diff)
downloadvyos-cloud-init-ec22feeefe309187107e0fb5471136f1c8a646c9.tar.gz
vyos-cloud-init-ec22feeefe309187107e0fb5471136f1c8a646c9.zip
build up the 'wait_for' list including fingerprint.crt files
Diffstat (limited to 'tests/unittests/test_datasource')
-rw-r--r--tests/unittests/test_datasource/test_azure.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unittests/test_datasource/test_azure.py b/tests/unittests/test_datasource/test_azure.py
index be6fab70..a7094ec6 100644
--- a/tests/unittests/test_datasource/test_azure.py
+++ b/tests/unittests/test_datasource/test_azure.py
@@ -185,6 +185,19 @@ class TestAzureDataSource(MockerTestCase):
self.assertFalse(ret)
self.assertFalse('agent_invoked' in data)
+ def test_cfg_has_pubkeys(self):
+ odata = {'HostName': "myhost", 'UserName': "myuser"}
+ mypklist = [{'fingerprint': 'fp1', 'path': 'path1'}]
+ pubkeys = [(x['fingerprint'], x['path']) for x in mypklist]
+ data = {'ovfcontent': construct_valid_ovf_env(data=odata,
+ pubkeys=pubkeys)}
+
+ dsrc = self._get_ds(data)
+ ret = dsrc.get_data()
+ self.assertTrue(ret)
+ for mypk in mypklist:
+ self.assertIn(mypk, dsrc.cfg['_pubkeys'])
+
class TestReadAzureOvf(MockerTestCase):
def test_invalid_xml_raises_non_azure_ds(self):