check for old or new ping output

This commit is contained in:
Ted Burghart 2016-03-21 16:10:50 -04:00
parent 6f67959ff0
commit 32a139d6a6

View File

@ -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) ->