diff options
author | franck cuny <franck@lumberjaph.net> | 2010-06-16 13:32:54 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-06-16 13:32:54 +0200 |
commit | 8093f1bc8a54c4f205460d4fbc1706f45bb6a195 (patch) | |
tree | 89837da677b706006742ed2559d9870ed8faf42a /t/06_host.t | |
parent | add three map/reduce operations (from the fast track) (diff) | |
download | net-riak-8093f1bc8a54c4f205460d4fbc1706f45bb6a195.tar.gz |
accept multiples hosts so we don't always hit the same node
Diffstat (limited to 't/06_host.t')
-rw-r--r-- | t/06_host.t | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/06_host.t b/t/06_host.t new file mode 100644 index 0000000..801e8b4 --- /dev/null +++ b/t/06_host.t @@ -0,0 +1,20 @@ +use strict; +use warnings; +use Test::More; + +package test::host; +use Moose; with 'Net::Riak::Role::Hosts'; + +package main; + +my $test = test::host->new(); +is scalar @{$test->host}, 1, 'got one host'; + +ok my $host = $test->get_host, 'got host'; +is $host, 'http://127.0.0.1:8098', 'host is ok'; + +$test = test::host->new(host => ['http://10.0.0.40', 'http://10.0.0.41']); +is scalar @{$test->host}, 2, 'got two hosts'; +ok $host = $test->get_host, 'got host'; + +done_testing; |