summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-01-23 20:12:02 -0500
committerScott Moser <smoser@ubuntu.com>2014-01-23 20:12:02 -0500
commit83087580ace7c392477a6772bb0cb254012c8a4e (patch)
tree8d18b149a7c180a5e332dbfafca345190952c5b3 /tests/unittests/test_datasource
parent5aa7d4ccf984ac296f58fa355bdce17d175dcc7d (diff)
parente6da32a91c59f33fd72bebc43f8e6beae73fbf39 (diff)
downloadvyos-cloud-init-83087580ace7c392477a6772bb0cb254012c8a4e.tar.gz
vyos-cloud-init-83087580ace7c392477a6772bb0cb254012c8a4e.zip
Skip retry and continued fetch of userdata when NOT_FOUND
When a 404 http code comes back from the fetching of ec2 data, instead of retrying immediately stop the fetching process and in the userdata fetching function handle this case as a special case of no userdata being fetched (an empty string in this case).
Diffstat (limited to 'tests/unittests/test_datasource')
-rw-r--r--tests/unittests/test_datasource/test_maas.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unittests/test_datasource/test_maas.py b/tests/unittests/test_datasource/test_maas.py
index 2007a6df..ebfb24da 100644
--- a/tests/unittests/test_datasource/test_maas.py
+++ b/tests/unittests/test_datasource/test_maas.py
@@ -119,7 +119,8 @@ class TestMAASDataSource(mocker.MockerTestCase):
mock_request(url, headers=None, timeout=mocker.ANY,
data=mocker.ANY, sec_between=mocker.ANY,
ssl_details=mocker.ANY, retries=mocker.ANY,
- headers_cb=my_headers_cb)
+ headers_cb=my_headers_cb,
+ exception_cb=mocker.ANY)
resp = valid.get(key)
self.mocker.result(util.StringResponse(resp))
self.mocker.replay()