summaryrefslogtreecommitdiff
path: root/xt/10_backend.t
blob: 9184bcf7475f569c919b81f704a20ebac1610e1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use strict;
use warnings;

use Test::More;
use Scope::Guard;

BEGIN {
    use IO::Socket::INET;
    my $addr = shift || "127.0.0.1:21201";
    my $msock = IO::Socket::INET->new(
        PeerAddr => $addr,
        Timeout  => 3
    );
    if ( $msock ) {
        plan 'no_plan';
    } else {
        plan skip_all => "No memcachedb instance running\n";
        exit 0;
    }
}

use ok 'KiokuDB';
use ok 'KiokuDB::Backend::Memcachedb';

use KiokuDB::Test;

my $db = Cache::Memcached->new( { 'servers' => [ '127.0.0.1:21201' ] } );

run_all_fixtures(
    KiokuDB->new(
        backend => KiokuDB::Backend::Memcachedb->new( db => $db, ),
    )
);