mirror of
https://github.com/ncarlier/webhookd.git
synced 2025-04-09 02:43:42 +00:00
feat
Add PORT parameter with default value
This commit is contained in:
parent
0183c31146
commit
bb24dae3b0
14
test.sh
14
test.sh
|
@ -1,34 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
IP=`sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' webhookd`
|
||||
PORT=${1:-8080}
|
||||
|
||||
echo "Test URL: http://$IP:$PORT"
|
||||
echo "Test bad URL"
|
||||
curl -H "Content-Type: application/json" \
|
||||
--data @assets/bitbucket.json \
|
||||
http://$IP:8080/bad/action
|
||||
http://$IP:$PORT/bad/action
|
||||
|
||||
echo "Test Bitbucket hook"
|
||||
curl -H "Content-Type: application/json" \
|
||||
--data @assets/bitbucket.json \
|
||||
http://$IP:8080/bitbucket/echo
|
||||
http://$IP:$PORT/bitbucket/echo
|
||||
|
||||
echo "Test Bitbucket hook"
|
||||
curl -H "Content-Type: application/x-www-form-urlencoded" \
|
||||
--data @assets/bitbucket.raw \
|
||||
http://$IP:8080/bitbucket/echo
|
||||
http://$IP:$PORT/bitbucket/echo
|
||||
|
||||
echo "Test Github hook"
|
||||
curl -H "Content-Type: application/json" \
|
||||
--data @assets/github.json \
|
||||
http://$IP:8080/github/echo
|
||||
http://$IP:$PORT/github/echo
|
||||
|
||||
echo "Test Gitlab hook"
|
||||
curl -H "Content-Type: application/json" \
|
||||
--data @assets/gitlab.json \
|
||||
http://$IP:8080/gitlab/echo
|
||||
http://$IP:$PORT/gitlab/echo
|
||||
|
||||
echo "Test Docker hook"
|
||||
curl -H "Content-Type: application/json" \
|
||||
--data @assets/docker.json \
|
||||
http://$IP:8080/docker/echo
|
||||
http://$IP:$PORT/docker/echo
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user