mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-19 18:34:59 +00:00
Use simpler URL HTTPMicro vs. HTTP::Tiny comparison.
This commit is contained in:
@@ -16,17 +16,19 @@ use HTTPMicro;
|
||||
local $EVAL_ERROR;
|
||||
eval { require HTTP::Tiny };
|
||||
if ( $EVAL_ERROR ) {
|
||||
plan skip_all => "HTTP::Tiny is not installed, not testing compat";
|
||||
plan skip_all => "HTTP::Tiny is not installed";
|
||||
}
|
||||
|
||||
my $test_url = "http://www.google.com";
|
||||
# Need a simple URL that won't try to do chunking.
|
||||
my $test_url = "http://www.percona.com/robots.txt";
|
||||
my $tiny = HTTP::Tiny->new(max_redirect => 0)->request('GET', $test_url);
|
||||
my $micro = HTTPMicro->new->request('GET', $test_url);
|
||||
|
||||
is_deeply(
|
||||
$micro->{content},
|
||||
$tiny->{content},
|
||||
"HTTPMicro behaves like HTTP::Tiny (with max_redirect) for $test_url"
|
||||
"HTTPMicro behaves like HTTP::Tiny (max_redirect=0)"
|
||||
);
|
||||
|
||||
done_testing;
|
||||
exit;
|
||||
|
Reference in New Issue
Block a user