mirror of
https://github.com/ncarlier/webhookd.git
synced 2024-09-20 08:55:28 +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
|
#!/bin/sh
|
||||||
|
|
||||||
IP=`sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' webhookd`
|
IP=`sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' webhookd`
|
||||||
|
PORT=${1:-8080}
|
||||||
|
|
||||||
|
echo "Test URL: http://$IP:$PORT"
|
||||||
echo "Test bad URL"
|
echo "Test bad URL"
|
||||||
curl -H "Content-Type: application/json" \
|
curl -H "Content-Type: application/json" \
|
||||||
--data @assets/bitbucket.json \
|
--data @assets/bitbucket.json \
|
||||||
http://$IP:8080/bad/action
|
http://$IP:$PORT/bad/action
|
||||||
|
|
||||||
echo "Test Bitbucket hook"
|
echo "Test Bitbucket hook"
|
||||||
curl -H "Content-Type: application/json" \
|
curl -H "Content-Type: application/json" \
|
||||||
--data @assets/bitbucket.json \
|
--data @assets/bitbucket.json \
|
||||||
http://$IP:8080/bitbucket/echo
|
http://$IP:$PORT/bitbucket/echo
|
||||||
|
|
||||||
echo "Test Bitbucket hook"
|
echo "Test Bitbucket hook"
|
||||||
curl -H "Content-Type: application/x-www-form-urlencoded" \
|
curl -H "Content-Type: application/x-www-form-urlencoded" \
|
||||||
--data @assets/bitbucket.raw \
|
--data @assets/bitbucket.raw \
|
||||||
http://$IP:8080/bitbucket/echo
|
http://$IP:$PORT/bitbucket/echo
|
||||||
|
|
||||||
echo "Test Github hook"
|
echo "Test Github hook"
|
||||||
curl -H "Content-Type: application/json" \
|
curl -H "Content-Type: application/json" \
|
||||||
--data @assets/github.json \
|
--data @assets/github.json \
|
||||||
http://$IP:8080/github/echo
|
http://$IP:$PORT/github/echo
|
||||||
|
|
||||||
echo "Test Gitlab hook"
|
echo "Test Gitlab hook"
|
||||||
curl -H "Content-Type: application/json" \
|
curl -H "Content-Type: application/json" \
|
||||||
--data @assets/gitlab.json \
|
--data @assets/gitlab.json \
|
||||||
http://$IP:8080/gitlab/echo
|
http://$IP:$PORT/gitlab/echo
|
||||||
|
|
||||||
echo "Test Docker hook"
|
echo "Test Docker hook"
|
||||||
curl -H "Content-Type: application/json" \
|
curl -H "Content-Type: application/json" \
|
||||||
--data @assets/docker.json \
|
--data @assets/docker.json \
|
||||||
http://$IP:8080/docker/echo
|
http://$IP:$PORT/docker/echo
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user