Skip to content

Commit

Permalink
Add more details on failure and success cases to curl check
Browse files Browse the repository at this point in the history
  • Loading branch information
brianfeucht committed Jan 4, 2024
1 parent b1b9dda commit 93b51a6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/sample-app-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,13 @@ jobs:
- name: Run docker
run: docker run --detach -p 9000:8080 samplelambda-dotnet${{ matrix.version }}:latest
- name: Test function
run: curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}' | grep -q iVB
run: |
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}' -o /tmp/lambda_result.txt \
if grep -q iVB /tmp/lambda_result.txt ; then \
echo "SUCCESS: The lambda rendered a PNG" \
exit 0 \
else \
echo "FAILURE: The lambda did not return expected png value starting with iVB" \
cat /tmp/lambda_result.txt \
exit 1 \
fi \

0 comments on commit 93b51a6

Please sign in to comment.