diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-08-22 16:36:32 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-08-22 16:36:32 -0400 |
commit | ba20ec431aa9275423d2e09154f5befb8961373b (patch) | |
tree | a5b7cad4967b208815ac8b0cabfa589e0a0354d4 /tests | |
parent | f181c7cbdc08222f195fa84a379f35a456d26123 (diff) | |
parent | d723c17b7abe5263d879d748dade763034cce476 (diff) | |
download | vyos-cloud-init-ba20ec431aa9275423d2e09154f5befb8961373b.tar.gz vyos-cloud-init-ba20ec431aa9275423d2e09154f5befb8961373b.zip |
merge from trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_datasource/test_openstack.py | 4 | ||||
-rw-r--r-- | tests/unittests/test_ec2_util.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/unittests/test_datasource/test_openstack.py b/tests/unittests/test_datasource/test_openstack.py index c088bb55..f43cbec8 100644 --- a/tests/unittests/test_datasource/test_openstack.py +++ b/tests/unittests/test_datasource/test_openstack.py @@ -88,7 +88,7 @@ def _register_uris(version, ec2_files, ec2_meta, os_files): path = uri.path.lstrip("/") if path in ec2_files: return (200, headers, ec2_files.get(path)) - if path == 'latest/meta-data': + if path == 'latest/meta-data/': buf = StringIO() for (k, v) in ec2_meta.items(): if isinstance(v, (list, tuple)): @@ -97,7 +97,7 @@ def _register_uris(version, ec2_files, ec2_meta, os_files): buf.write("%s" % (k)) buf.write("\n") return (200, headers, buf.getvalue()) - if path.startswith('latest/meta-data'): + if path.startswith('latest/meta-data/'): value = None pieces = path.split("/") if path.endswith("/"): diff --git a/tests/unittests/test_ec2_util.py b/tests/unittests/test_ec2_util.py index 700254a3..84aa002e 100644 --- a/tests/unittests/test_ec2_util.py +++ b/tests/unittests/test_ec2_util.py @@ -44,7 +44,7 @@ class TestEc2Util(helpers.HttprettyTestCase): @hp.activate def test_metadata_fetch_no_keys(self): - base_url = 'http://169.254.169.254/%s/meta-data' % (self.VERSION) + base_url = 'http://169.254.169.254/%s/meta-data/' % (self.VERSION) hp.register_uri(hp.GET, base_url, status=200, body="\n".join(['hostname', 'instance-id', @@ -62,7 +62,7 @@ class TestEc2Util(helpers.HttprettyTestCase): @hp.activate def test_metadata_fetch_key(self): - base_url = 'http://169.254.169.254/%s/meta-data' % (self.VERSION) + base_url = 'http://169.254.169.254/%s/meta-data/' % (self.VERSION) hp.register_uri(hp.GET, base_url, status=200, body="\n".join(['hostname', 'instance-id', @@ -83,7 +83,7 @@ class TestEc2Util(helpers.HttprettyTestCase): @hp.activate def test_metadata_fetch_with_2_keys(self): - base_url = 'http://169.254.169.254/%s/meta-data' % (self.VERSION) + base_url = 'http://169.254.169.254/%s/meta-data/' % (self.VERSION) hp.register_uri(hp.GET, base_url, status=200, body="\n".join(['hostname', 'instance-id', @@ -108,7 +108,7 @@ class TestEc2Util(helpers.HttprettyTestCase): @hp.activate def test_metadata_fetch_bdm(self): - base_url = 'http://169.254.169.254/%s/meta-data' % (self.VERSION) + base_url = 'http://169.254.169.254/%s/meta-data/' % (self.VERSION) hp.register_uri(hp.GET, base_url, status=200, body="\n".join(['hostname', 'instance-id', |