File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 8383 run : |
8484 echo "🚀 POST $API_BASE/"
8585 echo "📄 Payload contents:"
86- cat "$JSON_PAYLOAD_PATH" || { echo "❌ files_payload.json not found"; exit 1; }
87- echo
88-
86+
8987 response=$(curl -s -w "\n%{http_code}" -X POST "$API_BASE/" \
9088 -H "Authorization: Bearer $TOKEN" \
9189 -H "Content-Type: application/json" \
Original file line number Diff line number Diff line change @@ -86,13 +86,15 @@ jobs:
8686 cat "$JSON_PAYLOAD_PATH" || { echo "❌ files_payload.json not found"; exit 1; }
8787 echo
8888
89+
8990 response=$(curl -s -w "\n%{http_code}" -X POST "$API_BASE/" \
9091 -H "Authorization: Bearer $TOKEN" \
9192 -H "Content-Type: application/json" \
92- --data @" $JSON_PAYLOAD_PATH")
93+ --data-binary "@ $JSON_PAYLOAD_PATH")
9394
9495 body=$(echo "$response" | head -n -1)
9596 status_code=$(echo "$response" | tail -n1)
97+
9698 echo "🌐 HTTP status: $status_code"
9799 echo "🌐 Response body:"
98100 echo "$body" | jq . || true
@@ -101,10 +103,13 @@ jobs:
101103 echo "❌ POST failed (HTTP $status_code)"
102104 exit 1
103105 fi
106+
104107 result_status=$(jq -r '.status' <<< "$body")
105108 result_message=$(jq -r '.message' <<< "$body")
109+
106110 if [ "$result_status" != "passed" ]; then
107111 echo "❌ Validation failed: $result_message"
108112 exit 1
109113 fi
114+
110115 echo "✅ Validation passed: $result_message"
You can’t perform that action at this time.
0 commit comments