summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/basic.t16
1 files changed, 10 insertions, 6 deletions
diff --git a/t/basic.t b/t/basic.t
index ecb1d05..cf0e6a2 100644
--- a/t/basic.t
+++ b/t/basic.t
@@ -5,12 +5,16 @@ use JSON::XS;
use Test::Exception;
use AnyEvent::Riak;
-my $jiak = AnyEvent::Riak->new(
- host => 'http://127.0.0.1:8098',
-
- #host => 'http://192.168.0.11:8098',
- path => 'jiak'
-);
+my ($host, $path);
+BEGIN {
+ my $riak_test = $ENV{RIAK_TEST_SERVER};
+ ( $host, $path ) = split ";", $riak_test if $riak_test;
+ plan skip_all =>
+ 'set $ENV{RIAK_TEST_SERVER} like this http://127.0.0.1:8098;jiak if you want to run the tests'
+ unless ( $host && $path );
+}
+
+my $jiak = AnyEvent::Riak->new( host => $host, path => $path );
ok my $buckets = $jiak->list_bucket('bar')->recv, "... fetch bucket list";
is scalar @{ $buckets->{keys} }, '0', '... no keys';