summaryrefslogtreecommitdiff
path: root/test/it_url.t
diff options
context:
space:
mode:
authorUrban Müller2024-07-03 18:30:40 +0200
committerUrban Müller2024-07-03 18:30:40 +0200
commit0f3b884db2baa72b87eb9c32ecdf03649598ae81 (patch)
tree92b47a27851ca1bb321db82ed05c95e2e194a7bd /test/it_url.t
parent5c567c34ccdbdcd667541bc0030c71ffb0152806 (diff)
downloaditools-0f3b884db2baa72b87eb9c32ecdf03649598ae81.tar.gz
itools-0f3b884db2baa72b87eb9c32ecdf03649598ae81.tar.bz2
itools-0f3b884db2baa72b87eb9c32ecdf03649598ae81.zip
make retries => 0 consistent with retries => 1: no it::error on 404
Diffstat (limited to 'test/it_url.t')
-rwxr-xr-xtest/it_url.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/it_url.t b/test/it_url.t
index 2e7d4f2..71469a8 100755
--- a/test/it_url.t
+++ b/test/it_url.t
@@ -259,10 +259,18 @@ $output = handle_server(
);
if (!ok(
count(preg_grep('/^Got Request:/', $output)) == 1,
- 'it_url::get() does not retry on 404'
+ 'it_url::get() does not retry on 404, no it_error'
))
diag($output);
+
+handle_server(
+ ok(
+ !it_url::get(['url' => "http://$host/does_not_exist", 'retries' => 0]),
+ 'it_url::get() on 404, no it_error'
+ )
+);
+
$output = handle_server(
ok(
it_url::get(['url' => "http://$host/not_found_with_body", 'body_on_fail' => true, 'it_error' => false]),