diff options
author | Josh Smith <joshsmith@codethink.co.uk> | 2018-07-24 17:21:18 +0100 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-07-27 13:41:26 +0900 |
commit | 0a7cfcdfdd71885a404e780027893e3ab9be4b84 (patch) | |
tree | 5b5d99a9b57f439e01e810f49303ec3a30153020 /tests/sources/zip.py | |
parent | ca224425cfe281b4940fd8f84d50c0ec77cb7fad (diff) | |
download | buildstream-0a7cfcdfdd71885a404e780027893e3ab9be4b84.tar.gz |
tests/sources: deb, tar and zip all test for retry behaviour
This is following 5d6418a06a3a0262df5f6b9e6e1a36578515fd4a where
DownloadableFileSource was modified to raise 'temporary'
errors when relating to file downloading.
Diffstat (limited to 'tests/sources/zip.py')
-rw-r--r-- | tests/sources/zip.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/sources/zip.py b/tests/sources/zip.py index 200dafcaa..a168d529b 100644 --- a/tests/sources/zip.py +++ b/tests/sources/zip.py @@ -43,7 +43,7 @@ def test_no_ref(cli, tmpdir, datafiles): assert cli.get_element_state(project, 'target.bst') == 'no reference' -# Test that when I fetch a nonexistent URL, errors are handled gracefully. +# Test that when I fetch a nonexistent URL, errors are handled gracefully and a retry is performed. @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch')) def test_fetch_bad_url(cli, tmpdir, datafiles): project = os.path.join(datafiles.dirname, datafiles.basename) @@ -53,6 +53,7 @@ def test_fetch_bad_url(cli, tmpdir, datafiles): result = cli.run(project=project, args=[ 'fetch', 'target.bst' ]) + assert "Try #" in result.stderr result.assert_main_error(ErrorDomain.STREAM, None) result.assert_task_error(ErrorDomain.SOURCE, None) |