diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-05-24 19:27:08 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-05-24 19:27:08 -0400 |
commit | 2ec72c91b7ba60b260ba0a50097df16f82960dd8 (patch) | |
tree | a740659e805b0f4ccc9229d88e91e099f2d668a8 /tests | |
parent | fdede2004249a8c0ac302531a5b3bc048458be3d (diff) | |
download | vyos-cloud-init-2ec72c91b7ba60b260ba0a50097df16f82960dd8.tar.gz vyos-cloud-init-2ec72c91b7ba60b260ba0a50097df16f82960dd8.zip |
fix logic error in ec2 get_instance_userdata and slow tests
The change to get_instance_userdata is to fix an issue that
was causing retry in the test when it was not desired.
if user_data returned 404 it means "there was no user-data", so
dont bother retrying. However, _skip_retry_on_codes was returning
False indicating that readurl should retry.
test_merging was creating 2500 random tests, shrink that down to 100.
test_seed_runs is still on my system the slowest test, but
taking < .5 seconds where it was taking > 3.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_merging.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unittests/test_merging.py b/tests/unittests/test_merging.py index 681f3780..a33ec184 100644 --- a/tests/unittests/test_merging.py +++ b/tests/unittests/test_merging.py @@ -125,9 +125,9 @@ class TestSimpleRun(helpers.ResourceUsingTestCase): def test_seed_runs(self): test_dicts = [] - for i in range(1, 50): + for i in range(1, 10): base_dicts = [] - for j in range(1, 50): + for j in range(1, 10): base_dicts.append(make_dict(5, i * j)) test_dicts.append(base_dicts) for test in test_dicts: |