From 091f697a575e87baba119573f9c75348f993c18d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 11 Jun 2020 07:36:56 -0700 Subject: [PATCH] test: Rename cookie file from .test-cookie to .cookie-tictactoe In order to have a little independence between test sections, let's move to having independent cookie files for each. --- .gitignore | 2 +- test | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index bed72fb..b1560ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules game.html lmno-config.json -.test-cookie +.cookie-* diff --git a/test b/test index d8a46ec..8d01515 100755 --- a/test +++ b/test @@ -300,37 +300,37 @@ TEST_SECTION "Tic Tac Toe game" tictactoe_game_path=tictactoe/$tictactoe_game_id -tictactoe_move() +tictactoe_profile() { - curl_post $tictactoe_game_path/move "{ \"move\": $1 }" "-b .test-cookie" + curl_put /profile "{ \"nickname\": \"$1\" }" "-c .cookie-tictactoe" } -lmno_profile() +tictactoe_move() { - curl_put /profile "{ \"nickname\": \"$1\" }" "-c .test-cookie" + curl_post $tictactoe_game_path/move "{ \"move\": $1 }" "-b .cookie-tictactoe" } tictactoe_player_info() { - curl_get $tictactoe_game_path/events "-m 0.1 -b .test-cookie" 2>&1 \ + curl_get $tictactoe_game_path/events "-m 0.1 -b .cookie-tictactoe" 2>&1 \ | grep player-info -A 1 \ | grep ^data } tictactoe_player_name() { - curl_put $tictactoe_game_path/player "{ \"name\": \"$1\" }" "-b .test-cookie" + curl_put $tictactoe_game_path/player "{ \"name\": \"$1\" }" "-b .cookie-tictactoe" } tictactoe_player_team() { - curl_put $tictactoe_game_path/player "{ \"team\": \"$1\" }" "-b .test-cookie" + curl_put $tictactoe_game_path/player "{ \"team\": \"$1\" }" "-b .cookie-tictactoe" } TEST_SUBSECTION "Tic Tac Toe player-info" TEST "Hit LMNO /profile to set name to 'curl'" -lmno_profile curl +tictactoe_profile curl TEST_END TEST "Verify player-info event reports 'curl' name" -- 2.43.0