summaryrefslogtreecommitdiff
path: root/t/10_riak.t
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--t/10_riak.t35
1 files changed, 35 insertions, 0 deletions
diff --git a/t/10_riak.t b/t/10_riak.t
new file mode 100644
index 0000000..808a964
--- /dev/null
+++ b/t/10_riak.t
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+
+use Scope::Guard;
+use Test::More 'no_plan';
+
+#BEGIN {
+# plan skip_all => 'Please set KIOKU_RIAK_URI to a Riak instance URI' unless $ENV{KIOKU_RIAK_URI};
+# plan 'no_plan';
+#}
+
+use ok 'KiokuDB';
+use ok 'KiokuDB::Backend::Riak';
+
+use KiokuDB::Test;
+
+use AnyEvent::Riak;
+
+my $db = AnyEvent::Riak->new(
+ host => 'http://localhost:8098',
+ path => 'jiak',
+);
+
+my $bucket = $db->list_bucket('kiokudb')->recv;
+foreach my $key (@{$bucket->{keys}}) {
+ $db->delete('kiokudb', $key)->recv;
+}
+
+run_all_fixtures(
+ KiokuDB->new(
+ backend => KiokuDB::Backend::Riak->new(
+ db => $db,
+ bucket => 'kiokudb',
+ ),
+ )
+);