File: store-redis.t

package info (click to toggle)
librdf-trine-perl 1.015-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,188 kB
  • ctags: 1,059
  • sloc: perl: 17,584; makefile: 30; sql: 20
file content (37 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (6)
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
34
35
36
37
use strict;
use warnings;
no warnings 'redefine';

use Test::More;
use FindBin '$Bin';
use lib "$Bin/lib";
use Test::RDF::Trine::Store qw(all_store_tests number_of_tests);

use RDF::Trine qw(iri variable store literal);
use RDF::Trine::Store;

my $tests	= 1 + Test::RDF::Trine::Store::number_of_tests;

SKIP: {
	eval "use RDF::Trine::Store::Redis;";
	if ($@) {
		plan skip_all => "Need Redis to run these tests.";
	} elsif (not exists $ENV{RDFTRINE_STORE_REDIS_SERVER}) {
		plan skip_all => "Set the Redis environment variable to run these tests (RDFTRINE_STORE_REDIS_SERVER)";
	} else {
		plan tests => $tests;
	}
	my $server	= $ENV{RDFTRINE_STORE_REDIS_SERVER};
	
	
	
	my $data = Test::RDF::Trine::Store::create_data;
	my $store	= RDF::Trine::Store::Redis->new( server => $server );
	isa_ok( $store, 'RDF::Trine::Store::Redis' );
	
	$store->nuke;
	Test::RDF::Trine::Store::all_store_tests($store, $data, 0);
	$store->nuke;
}

done_testing;