@@ -13,7 +13,8 @@ readonly TEST_TAGS="${TEST_TAGS:-}"
1313post_data () {
1414 local url=$1
1515 local body=$2
16- if ! response=$( curl -s -f -X POST -H " Authorization: Bearer $API_TOKEN " -H " Content-Type: application/json" -d " $body " " $url " ) ; then
16+ # ADD -v FLAG HERE for debugging, you can remove it later
17+ if ! response=$( curl -s -f -v -X POST -H " Authorization: Bearer $API_TOKEN " -H " Content-Type: application/json" -d " $body " " $url " 2>&1 ) ; then # 2>&1 captures stderr too
1718 echo " Error: Network request failed with error $response " >&2
1819 exit 1
1920 fi
4344
4445# Upload build file
4546echo -n " Uploading build from $buildFilename for $buildPlatform : "
46- if ! uploadedBuildResponse=$( curl -s -f -X POST \
47+ # ADD -v FLAG HERE for debugging, you can remove it later
48+ if ! uploadedBuildResponse=$( curl -s -f -v -X POST \
4749 -H " Authorization: Bearer $API_TOKEN " \
4850 -H " Content-Type: multipart/form-data" \
4951 -F " build=@$buildFilename " \
5052 -F " organisation_key=$API_ORG_KEY " \
5153 -F " platform=$buildPlatform " \
5254 -F " metadata={}" \
53- " $API_URL /uploadBuild/" ) ; then
55+ " $API_URL /uploadBuild/" 2>&1 ) ; then # 2>&1 captures stderr too
5456 echo " Error: Failed to upload build" >&2
5557 exit 1
5658fi
8082echo -n " Waiting for test suite to finish..."
8183startTime=$( date +%s)
8284while true ; do
83- if ! testSuiteData=$( curl -s -f " $API_URL /testSuiteRuns/$testSuiteRunId /gh" ) ; then
85+ # ADD -v FLAG HERE for debugging, you can remove it later
86+ if ! testSuiteData=$( curl -s -f -v " $API_URL /testSuiteRuns/$testSuiteRunId /gh" 2>&1 ) ; then # 2>&1 captures stderr too
8487 echo " Error: Failed to retrieve test suite data" >&2
8588 exit 1
8689 fi
@@ -121,4 +124,4 @@ if [[ "$testSuiteResult" == "succeeded" ]]; then
121124else
122125 echo " Test suite did not pass, result: $testSuiteResult " >&2
123126 exit 1
124- fi
127+ fi
0 commit comments