Permalink
Browse files

Environment variable for setting port and host. Also make tests more …

…verbose
  • Loading branch information...
1 parent a1abefc commit b3890c40283912bffdb8c857cade5839cef343eb @kthakore committed Jan 29, 2012
Showing with 4 additions and 5 deletions.
  1. +2 −2 lib/KiokuDB/Backend/Riak.pm
  2. +1 −1 t/01-kiokudb.t
  3. +1 −2 t/02-class.t
@@ -62,8 +62,8 @@ has '+class_meta_field' => ( default => 'class_meta' );
sub _build_bucket {
my ($self) = @_;
- my $host = $self->host || 'localhost';
- my $port = $self->port || 8091;
+ my $host = $self->host || $ENV{KRB_HOST} || 'localhost';
+ my $port = $self->port || $ENV{KRB_PORT} || 8098;
my $bucket = $self->bucket_name;
my $options = $self->options;
my $uri = 'http://' . $host . ':' . $port;
View
@@ -44,7 +44,7 @@ $d->update;
my @res = $d->search( { data_test => 'stuff', data_foo_b_ar => 'stt' }, { inline => 'true' } )->all();
-is_deeply( $res[0], { test => 'stuff', foo => { b_ar => 'stt' } } );
+is_deeply( $res[0], { test => 'stuff', foo => { b_ar => 'stt' } }, 'Tests for search' );
$backend->clear;
View
@@ -43,10 +43,9 @@ isa_ok( $back->bar, 'Bar' );
my $buuid = $d->object_to_id( $back->bar );
-
my @res = $d->search( { 'data_bar_$ref' => $buuid.'*' } )->all;
-is_deeply( $res[0], $foo );
+is_deeply( $res[0], $foo, 'Test for class searching' );
$backend->clear;

0 comments on commit b3890c4

Please sign in to comment.