summaryrefslogtreecommitdiff
path: root/tests/unittests/test_ec2_util.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2014-02-07 15:14:26 -0800
committerJoshua Harlow <harlowja@yahoo-inc.com>2014-02-07 15:14:26 -0800
commit2983a26ecf9716dc957ec4bacf15544072774190 (patch)
treea7e074c21789ebc553713b3fd591fd9bbe4a9684 /tests/unittests/test_ec2_util.py
parent810df2c55c108e7e4064263e508d9786d8b1dc8e (diff)
parent3cfe9b3d8958b1a4e450d5ff31d805c424945027 (diff)
downloadvyos-cloud-init-2983a26ecf9716dc957ec4bacf15544072774190.tar.gz
vyos-cloud-init-2983a26ecf9716dc957ec4bacf15544072774190.zip
Remerged with trunk
Diffstat (limited to 'tests/unittests/test_ec2_util.py')
-rw-r--r--tests/unittests/test_ec2_util.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unittests/test_ec2_util.py b/tests/unittests/test_ec2_util.py
index 18d36d86..dd87665d 100644
--- a/tests/unittests/test_ec2_util.py
+++ b/tests/unittests/test_ec2_util.py
@@ -35,6 +35,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,