]> git.cworth.org Git - empires-server/commitdiff
test: Rename cookie file from .test-cookie to .cookie-tictactoe
authorCarl Worth <cworth@cworth.org>
Thu, 11 Jun 2020 14:36:56 +0000 (07:36 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 11 Jun 2020 14:36:56 +0000 (07:36 -0700)
In order to have a little independence between test sections, let's
move to having independent cookie files for each.

.gitignore
test

index bed72fb6c8a56c92ed8d87728578b3d784d743d8..b1560ad4c14f5dcbcfa9ce81bb172252a7a30a7a 100644 (file)
@@ -1,4 +1,4 @@
 node_modules
 game.html
 lmno-config.json
 node_modules
 game.html
 lmno-config.json
-.test-cookie
+.cookie-*
diff --git a/test b/test
index d8a46ec970edf2bc40e4b382c48e1979a5ea1501..8d01515418720f7d185854fa25cbc67a5c761179 100755 (executable)
--- a/test
+++ b/test
@@ -300,37 +300,37 @@ TEST_SECTION "Tic Tac Toe game"
 
 tictactoe_game_path=tictactoe/$tictactoe_game_id
 
 
 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()
 {
 }
 
 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()
 {
         | 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()
 {
 }
 
 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'"
 }
 
 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"
 TEST_END
 
 TEST "Verify player-info event reports 'curl' name"