summaryrefslogtreecommitdiff
path: root/tests/it_url.t
diff options
context:
space:
mode:
authorNathan Gass2017-08-17 14:54:37 +0200
committerNathan Gass2017-08-17 14:54:37 +0200
commit2f68913fecf3a1d7d9b3eedfaeca35665c6372f5 (patch)
treefdae8048bc56e015986ea46b85d2d52b8618b9d0 /tests/it_url.t
parentc538a7a9159454aa0c2114ace81f5f15f154dece (diff)
downloaditools-2f68913fecf3a1d7d9b3eedfaeca35665c6372f5.tar.gz
itools-2f68913fecf3a1d7d9b3eedfaeca35665c6372f5.tar.bz2
itools-2f68913fecf3a1d7d9b3eedfaeca35665c6372f5.zip
testserver returns 404 on unknown path, better reflect intended retry behaviour in tests and test descriptions
Diffstat (limited to 'tests/it_url.t')
-rwxr-xr-xtests/it_url.t16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/it_url.t b/tests/it_url.t
index 83f818f..379a4cb 100755
--- a/tests/it_url.t
+++ b/tests/it_url.t
@@ -235,12 +235,24 @@ if (!ok(
$output = handle_server(
ok(
!it_url::get(array('url' => 'http://localhost:8000/does_not_exist', 'retries' => 4)),
- 'it_url::get() retries on empty response'
+ 'it_url::get() on 404'
+ )
+);
+if (!ok(
+ count(preg_grep('/^Got Request:/', $output)) == 1,
+ 'it_url::get() does not retry on 404'
+))
+ diag($output);
+
+$output = handle_server(
+ ok(
+ !it_url::get(array('url' => 'http://localhost:8000/repeat?num=0', 'retries' => 4)),
+ 'it_url::get() on empty page'
)
);
if (!ok(
count(preg_grep('/^Got Request:/', $output)) == 5,
- 'it_url::get() respects set retry count'
+ 'it_url::get() does retry on empty page'
))
diag($output);