diff options
author | Ben Howard <ben.howard@canonical.com> | 2014-01-24 14:20:54 -0700 |
---|---|---|
committer | Ben Howard <ben.howard@canonical.com> | 2014-01-24 14:20:54 -0700 |
commit | 85d8ec03ea4dd01d37b141390d1ae5c7d10e7052 (patch) | |
tree | a97ddb7f71d00e857dd718b4004f52638736c299 /tests/unittests/test_ec2_util.py | |
parent | 7079fac4646380db1e064a433d7843473bda1542 (diff) | |
parent | 4919cd124e57e82ecfcdaa9bfcbc051c719708e6 (diff) | |
download | vyos-cloud-init-85d8ec03ea4dd01d37b141390d1ae5c7d10e7052.tar.gz vyos-cloud-init-85d8ec03ea4dd01d37b141390d1ae5c7d10e7052.zip |
Rebasing on trunk
Diffstat (limited to 'tests/unittests/test_ec2_util.py')
-rw-r--r-- | tests/unittests/test_ec2_util.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unittests/test_ec2_util.py b/tests/unittests/test_ec2_util.py index dd588aca..957dc3f2 100644 --- a/tests/unittests/test_ec2_util.py +++ b/tests/unittests/test_ec2_util.py @@ -34,6 +34,14 @@ class TestEc2Util(helpers.TestCase): self.assertEquals('', userdata) @hp.activate + def test_userdata_fetch_fail_server_not_found(self): + hp.register_uri(hp.GET, + 'http://169.254.169.254/%s/user-data' % (self.VERSION), + status=404) + userdata = eu.get_instance_userdata(self.VERSION) + self.assertEquals('', userdata) + + @hp.activate def test_metadata_fetch_no_keys(self): base_url = 'http://169.254.169.254/%s/meta-data' % (self.VERSION) hp.register_uri(hp.GET, base_url, status=200, |