Skip to content

Commit

Permalink
Handler should take clj body w/ optional headers & env as context
Browse files Browse the repository at this point in the history
  • Loading branch information
ccfontes committed Aug 20, 2023
1 parent 9009a69 commit 7b3ef2d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/faas_fn_build_invoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
faas build -f my-bb-http-function.yml
(docker stop my-bb-http-function || exit 0)
(docker rm my-bb-http-function || exit 0)
sleep 10
docker run -d --name my-bb-http-function ghcr.io/${{ github.repository_owner }}/my-bb-http-function:latest bb --main index
if [ "$(docker exec my-bb-http-function curl -X POST --data-raw "Hello world" --retry 6 --retry-delay 2 --retry-connrefused http://127.0.0.1:8082)" != "Hello world" ]; then
exit 2
Expand Down Expand Up @@ -64,19 +63,17 @@ jobs:
(docker stop bb-http-map || exit 0)
(docker rm bb-http-map || exit 0)
sleep 10
docker run -d --name bb-http-map ghcr.io/${{ github.repository_owner }}/bb-http-map:latest bb --main index
if [ "$(docker exec bb-http-map curl -X POST --data '{"foo": "bar", "spam": "eggs"}' --retry 6 --retry-delay 2 --retry-connrefused http://127.0.0.1:8082)" != '[["foo","spam"],["bar","eggs"]]' ]; then
if [ "$(docker exec bb-http-map curl -X POST -d '{"foo": "bar", "spam": "eggs"}' -H 'Content-Type: application/json' --retry 3 --retry-delay 2 --retry-connrefused http://127.0.0.1:8082)" != '[["foo","spam"],["bar","eggs"]]' ]; then
exit 6
fi
(docker stop bb-http-map || exit 0)
(docker rm bb-http-map || exit 0)
(docker stop bb-http-map-context || exit 0)
(docker rm bb-http-map-context || exit 0)
sleep 10
docker run -d --name bb-http-map-context ghcr.io/${{ github.repository_owner }}/bb-http-map-context:latest bb --main index
if [ "$(docker exec bb-http-map-context curl -X POST --data '{"foo": "bar", "spam": "eggs"}' --retry 6 --retry-delay 2 --retry-connrefused http://127.0.0.1:8082)" != '[["foo","spam"],["bar","eggs"],"application/json",true]' ]; then
if [ "$(docker exec bb-http-map-context curl -X POST -d '{"foo": "bar", "spam": "eggs"}' -H 'Content-Type: application/json' --retry 3 --retry-delay 2 --retry-connrefused http://127.0.0.1:8082)" != '[["foo","spam"],["bar","eggs"],"application/json",true]' ]; then
exit 7
fi
(docker stop bb-http-map-context || exit 0)
Expand Down

0 comments on commit 7b3ef2d

Please sign in to comment.