mirror of
https://github.com/ncarlier/webhookd.git
synced 2025-04-10 14:54:57 +00:00
chore: Update tests.
This commit is contained in:
parent
0906ae1217
commit
efa9a32fa6
1
assets/bitbucket.raw
Normal file
1
assets/bitbucket.raw
Normal file
|
@ -0,0 +1 @@
|
|||
payload=%7B%22repository%22%3A+%7B%22website%22%3A+%22http%3A%2F%2Freader.nuunx.org%2F%22%2C+%22fork%22%3A+false%2C+%22name%22%3A+%22reader%22%2C+%22scm%22%3A+%22git%22%2C+%22owner%22%3A+%22ncarlier%22%2C+%22absolute_url%22%3A+%22%2Fncarlier%2Freader%2F%22%2C+%22slug%22%3A+%22reader%22%2C+%22is_private%22%3A+true%7D%2C+%22truncated%22%3A+false%2C+%22commits%22%3A+%5B%7B%22node%22%3A+%223f96fd0bfec5%22%2C+%22files%22%3A+%5B%7B%22type%22%3A+%22modified%22%2C+%22file%22%3A+%22.gitignore%22%7D%2C+%7B%22type%22%3A+%22added%22%2C+%22file%22%3A+%22etc%2Fenv_sample.conf%22%7D%2C+%7B%22type%22%3A+%22removed%22%2C+%22file%22%3A+%22etc%2Freader_sample.conf%22%7D%5D%2C+%22raw_author%22%3A+%22Nicolas+Carlier+%3Cn.carlier%40nunux.org%3E%22%2C+%22utctimestamp%22%3A+%222014-09-25+09%3A59%3A27%2B00%3A00%22%2C+%22author%22%3A+%22ncarlier%22%2C+%22timestamp%22%3A+%222014-09-25+11%3A59%3A27%22%2C+%22raw_node%22%3A+%223f96fd0bfec585820a481137860450c620b5e4c0%22%2C+%22parents%22%3A+%5B%2261215ed61077%22%5D%2C+%22branch%22%3A+%22master%22%2C+%22message%22%3A+%22chore%3A+Rename+env+configuration+file.%5Cn%22%2C+%22revision%22%3A+null%2C+%22size%22%3A+-1%7D%5D%2C+%22canon_url%22%3A+%22https%3A%2F%2Fbitbucket.org%22%2C+%22user%22%3A+%22ncarlier%22%7D
|
29
test.sh
Executable file
29
test.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
IP=`sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' webhookd`
|
||||
|
||||
echo "Test bad URL"
|
||||
curl -H "Content-Type: application/json" \
|
||||
--data @assets/bitbucket.json \
|
||||
http://$IP:8080/bad/action
|
||||
|
||||
echo "Test Bitbucket hook"
|
||||
curl -H "Content-Type: application/json" \
|
||||
--data @assets/bitbucket.json \
|
||||
http://$IP:8080/bitbucket/echo
|
||||
|
||||
echo "Test Bitbucket hook"
|
||||
curl -H "Content-Type: application/x-www-form-urlencoded" \
|
||||
--data @assets/bitbucket.raw \
|
||||
http://$IP:8080/bitbucket/echo
|
||||
|
||||
echo "Test Github hook"
|
||||
curl -H "Content-Type: application/json" \
|
||||
--data @assets/github.json \
|
||||
http://$IP:8080/github/echo
|
||||
|
||||
echo "Test Docker hook"
|
||||
curl -H "Content-Type: application/json" \
|
||||
--data @assets/docker.json \
|
||||
http://$IP:8080/docker/echo
|
||||
|
Loading…
Reference in New Issue
Block a user