From 2caabea589eb3b16c83c6004fcd7f66e6aa15fec Mon Sep 17 00:00:00 2001 From: Reimar Date: Thu, 15 Aug 2024 11:03:11 +0200 Subject: [PATCH] Cleanup integration tests --- API/integration-tests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 API/integration-tests.sh diff --git a/API/integration-tests.sh b/API/integration-tests.sh old mode 100644 new mode 100755 index ed18805..03f4177 --- a/API/integration-tests.sh +++ b/API/integration-tests.sh @@ -1,6 +1,6 @@ #!/bin/sh -RESPONSE=`curl -sSLX POST http://localhost:5287/api/Users -d '{"Email":"hej@example.com","Username":"Gamer","Password":"Gamer123!"}' -H 'Content-Type: application/json' -H 'Accept: */*' -w '\n%{http_code}' --output -` +RESPONSE=`curl -sSLX POST http://localhost:5287/api/Users -d '{"Email":"hej@example.com","Username":"Gamer","Password":"Gamer123!"}' -H 'Content-Type: application/json' -H 'Accept: */*' -w '\n%{http_code}'` HTTP_STATUS=`echo -n "$RESPONSE" | tail -n 1` USER_ID=`echo "$RESPONSE" | head -n -1` @@ -14,7 +14,7 @@ fi echo -e " User ID: $USER_ID\n" -RESPONSE=`curl -sSLX POST http://localhost:5287/api/Users/login -d '{"Email":"hej@example.com","Password":"Gamer123!"}' -H 'Content-Type: application/json' -H 'Accept: */*' -w '\n%{http_code}' --output -` +RESPONSE=`curl -sSLX POST http://localhost:5287/api/Users/login -d '{"Email":"hej@example.com","Password":"Gamer123!"}' -H 'Content-Type: application/json' -H 'Accept: */*' -w '\n%{http_code}'` HTTP_STATUS=`echo -n "$RESPONSE" | tail -n 1` TOKEN=`echo "$RESPONSE" | head -n -1` @@ -28,7 +28,7 @@ fi echo -e " Received token: $TOKEN\n" -RESPONSE=`curl -sSL http://localhost:5287/api/Users/$USER_ID -w '\n%{http_code}' -H 'Accept: */*' --output -` +RESPONSE=`curl -sSL http://localhost:5287/api/Users/$USER_ID -w '\n%{http_code}' -H 'Accept: */*'` HTTP_STATUS=`echo -n "$RESPONSE" | tail -n 1` USER_DATA=`echo "$RESPONSE" | head -n -1` @@ -42,7 +42,7 @@ fi echo -e " User data: $USER_DATA\n" -RESPONSE=`curl -sSLX DELETE http://localhost:5287/api/Users/$USER_ID --location-trusted -w '%{http_code}' -H "Authorization: Bearer $TOKEN" -H 'Accept: */*' --output -` +RESPONSE=`curl -sSLX DELETE http://localhost:5287/api/Users/$USER_ID --location-trusted -w '%{http_code}' -H "Authorization: Bearer $TOKEN" -H 'Accept: */*'` HTTP_STATUS=`echo -n "$RESPONSE" | tail -n 1` echo "DELETE /api/Users/$USER_ID - $HTTP_STATUS"