AnyEvent-KVStore-Etcd
view release on metacpan or search on metacpan
t/02-readwrite.t view on Meta::CPAN
use lib 't';
use Test::Etcdkv;
use Test::More tests => 9;
use AnyEvent::KVStore;
use Data::Dumper;
my $guard = Test::Etcdkv->guard;
my $config = Test::Etcdkv->config;
ok(my $store = AnyEvent::KVStore->new(module => 'etcd', config => $config), 'Initiated the store');
ok((not $store->exists('/test/foo')), '/test/foo does not exist yet');
ok($store->write('/test/foo', 'bar'), 'Wrote bar to /test/foo');
t/03-watch.t view on Meta::CPAN
use lib 't';
use Test::Etcdkv;
use Test::More tests => 10;
use AnyEvent::KVStore;
use Data::Dumper;
use AnyEvent;
my $cb = sub { my ($k, $v) = @_; ok(1, "Got $k: $v"); };
my $cv = AnyEvent->condvar;
my $guard = Test::Etcdkv->guard;
( run in 0.496 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )