mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 08:35:22 +00:00
check for old or new ping output
This commit is contained in:
parent
6f67959ff0
commit
32a139d6a6
@ -24,6 +24,10 @@
|
||||
-compile(export_all).
|
||||
-export([confirm/0]).
|
||||
|
||||
% node_package 3.x changes this - new first, old second
|
||||
-define(PING_FAILURE_OUTPUT,
|
||||
["Node did not respond to ping!", "Node is not running!"]).
|
||||
|
||||
confirm() ->
|
||||
|
||||
%% Deploy a node to test against
|
||||
@ -118,7 +122,7 @@ ping_down_test(Node) ->
|
||||
attach_down_test(Node) ->
|
||||
lager:info("Testing riak attach while down"),
|
||||
{ok, AttachOut} = rt:riak(Node, ["attach"]),
|
||||
?assert(rt:str(AttachOut, "Node is not running!")),
|
||||
?assert(rt:str_mult(AttachOut, ?PING_FAILURE_OUTPUT)),
|
||||
ok.
|
||||
|
||||
attach_direct_up_test(Node) ->
|
||||
@ -133,7 +137,7 @@ attach_direct_up_test(Node) ->
|
||||
attach_direct_down_test(Node) ->
|
||||
lager:info("Testing riak attach-direct while down"),
|
||||
{ok, AttachOut} = rt:riak(Node, ["attach-direct"]),
|
||||
?assert(rt:str(AttachOut, "Node is not running!")),
|
||||
?assert(rt:str_mult(AttachOut, ?PING_FAILURE_OUTPUT)),
|
||||
ok.
|
||||
|
||||
status_up_test(Node) ->
|
||||
@ -151,7 +155,7 @@ status_down_test(Node) ->
|
||||
lager:info("Test riak-admin status while down"),
|
||||
{ok, {ExitCode, StatusOut}} = rt:admin(Node, ["status"], [return_exit_code]),
|
||||
?assertEqual(1, ExitCode),
|
||||
?assert(rt:str(StatusOut, "Node is not running!")),
|
||||
?assert(rt:str_mult(StatusOut, ?PING_FAILURE_OUTPUT)),
|
||||
ok.
|
||||
|
||||
getpid_up_test(Node) ->
|
||||
|
Loading…
Reference in New Issue
Block a user