Skip to content

Commit 9e64890

Browse files
Merge branch 'trial-testing:main' into main
2 parents 892923f + ee10693 commit 9e64890

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

β€Ž.github/workflows/auth.ymlβ€Ž

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,32 +79,14 @@ jobs:
7979
8080
8181
# 5. Send POST request with JSON payload to "/"
82-
- name: πŸš€ Send POST request with JSON payload to root
82+
- name: Send POST request with JSON payload
8383
run: |
8484
85-
echo "πŸš€ POST $API_BASE/"
86-
echo "πŸ“„ Payload contents:"
87-
cat "$JSON_PAYLOAD_PATH" || { echo "❌ files_payload.json not found"; exit 1; }
88-
89-
# Send POST and capture both body and status code
9085
response=$(curl -s -X POST "$API_BASE/" \
9186
-H "Authorization: Bearer $TOKEN" \
9287
-H "Content-Type: application/json" \
9388
--data-binary "@$JSON_PAYLOAD_PATH")
9489
95-
# # Split response into body and status code
96-
# body=$(echo "$response" | head -n -1)
97-
# status_code=$(echo "$response" | tail -n1)
98-
99-
# echo "🌐 HTTP status: $status_code"
100-
# echo "🌐 Response body:"
101-
# echo "$body" | jq . || echo "⚠️ Response is not valid JSON"
102-
103-
# # Check HTTP status
104-
# if [ "$status_code" -ne 200 ]; then
105-
# echo "❌ POST failed (HTTP $status_code)"
106-
# fi
107-
10890
message=$(jq -r '.message' <<< "$response")
10991
11092
echo -e "❌ Test Fail:\n$message"
@@ -115,9 +97,10 @@ jobs:
11597
result_message=$(echo "$body" | jq -r '.message // "No message provided"')
11698
11799
if [ "$result_status" != "passed" ]; then
118-
echo "❌ Validation failed: $result_message"
100+
101+
echo "❌ Validation failed: $message"
119102
exit 1
120103
fi
121104
122-
echo "βœ… Validation passed: $result_message"
105+
echo "βœ… Validation passed: $message"
123106

0 commit comments

Comments
Β (0)