diff options
author | Chad Smith <chad.smith@canonical.com> | 2017-09-06 12:11:13 -0600 |
---|---|---|
committer | Chad Smith <chad.smith@canonical.com> | 2017-09-06 12:11:13 -0600 |
commit | 5582e4a266118b63ff86b6258b23d66df6d129d5 (patch) | |
tree | b85d3ed19a506a9f3e9c3ffe55d1a3b4ba006e13 | |
parent | a3649e03206a3596131413956ea7ecc18790ec73 (diff) | |
download | vyos-cloud-init-5582e4a266118b63ff86b6258b23d66df6d129d5.tar.gz vyos-cloud-init-5582e4a266118b63ff86b6258b23d66df6d129d5.zip |
tests: mock missed openstack metadata uri network_data.json
This missed mock in test_openstack resulted in a costly unit test timeout.
LP: #1714376
-rw-r--r-- | tests/unittests/test_datasource/test_openstack.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unittests/test_datasource/test_openstack.py b/tests/unittests/test_datasource/test_openstack.py index 177e9808..ed367e05 100644 --- a/tests/unittests/test_datasource/test_openstack.py +++ b/tests/unittests/test_datasource/test_openstack.py @@ -57,6 +57,8 @@ OS_FILES = { 'openstack/content/0000': CONTENT_0, 'openstack/content/0001': CONTENT_1, 'openstack/latest/meta_data.json': json.dumps(OSTACK_META), + 'openstack/latest/network_data.json': json.dumps( + {'links': [], 'networks': [], 'services': []}), 'openstack/latest/user_data': USER_DATA, 'openstack/latest/vendor_data.json': json.dumps(VENDOR_DATA), } @@ -68,6 +70,7 @@ EC2_VERSIONS = [ ] +# TODO _register_uris should leverage test_ec2.register_mock_metaserver. def _register_uris(version, ec2_files, ec2_meta, os_files): """Registers a set of url patterns into httpretty that will mimic the same data returned by the openstack metadata service (and ec2 service).""" |