Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/postProcessTestRun.bash
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ emitSuccessfulTestData () {

#echo -e "\nSuccess payload: $successReport\n"
# Post the data as newline-delimited JSON
curl -k "https://103443579803.collect.observeinc.com/v1/http" -H "Authorization: Bearer $OBSERVE_MOBILE_TOKEN" -H "Content-Type: application/x-ndjson" --data-binary @- <<< "$successReport"
curl "https://103443579803.collect.observeinc.com/v1/http" -H "Authorization: Bearer $OBSERVE_MOBILE_TOKEN" -H "Content-Type: application/x-ndjson" --data-binary @- <<< "$successReport"
successReport="" # Reset the successReport after emitting it
successCount=0
}
Expand All @@ -59,7 +59,7 @@ do
# Wrap it in the "data" object for Observe
payload="{\"data\": $eventPayload}"
echo -e "\nsummary payload: $payload"
curl -k "https://103443579803.collect.observeinc.com/v1/http" -H "Authorization: Bearer $OBSERVE_MOBILE_TOKEN" -H "Content-Type: application/json" -d "$payload"
curl "https://103443579803.collect.observeinc.com/v1/http" -H "Authorization: Bearer $OBSERVE_MOBILE_TOKEN" -H "Content-Type: application/json" -d "$payload"
fi

# For <testcase> lines, store the test info. We will construct the payload at </testcase>
Expand Down Expand Up @@ -157,6 +157,6 @@ do
payload="{\"data\": $eventPayload}"

echo -e "\ncost payload: $payload"
curl -k "https://103443579803.collect.observeinc.com/v1/http" -H "Authorization: Bearer $OBSERVE_MOBILE_TOKEN" -H "Content-Type: application/json" -d "$payload"
curl "https://103443579803.collect.observeinc.com/v1/http" -H "Authorization: Bearer $OBSERVE_MOBILE_TOKEN" -H "Content-Type: application/json" -d "$payload"
fi
done < "$costFile"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is missing a trailing newline. POSIX requires text files to end with a newline, and many tools (linters, git diff, wc -l) behave unexpectedly without one. A simple fix is to add a blank line after this last line.

Loading