mirror of
https://github.com/ncarlier/webhookd.git
synced 2025-04-18 21:18:00 +00:00
feat: Add minimal test script.
This commit is contained in:
parent
4917e72bd2
commit
dbdd9f5776
8
Makefile
8
Makefile
|
@ -1,5 +1,5 @@
|
||||||
.SILENT :
|
.SILENT :
|
||||||
.PHONY : build clean fmt
|
.PHONY : build clean
|
||||||
|
|
||||||
TAG:=`git describe --abbrev=0 --tags`
|
TAG:=`git describe --abbrev=0 --tags`
|
||||||
LDFLAGS:=-X main.buildVersion $(TAG)
|
LDFLAGS:=-X main.buildVersion $(TAG)
|
||||||
|
@ -19,10 +19,10 @@ clean-dist:
|
||||||
|
|
||||||
dist: clean-dist
|
dist: clean-dist
|
||||||
mkdir -p dist/linux/amd64 && GOOS=linux GOARCH=amd64 go build -o dist/linux/amd64/$(APPNAME) ./src
|
mkdir -p dist/linux/amd64 && GOOS=linux GOARCH=amd64 go build -o dist/linux/amd64/$(APPNAME) ./src
|
||||||
# mkdir -p dist/linux/i386 && GOOS=linux GOARCH=386 go build -o dist/linux/i386/$APPNAME ./src
|
# mkdir -p dist/linux/i386 && GOOS=linux GOARCH=386 go build -o dist/linux/i386/$(APPNAME) ./src
|
||||||
|
|
||||||
release: dist
|
release: dist
|
||||||
# godep restore
|
# godep restore
|
||||||
tar -cvzf cloudconfd-linux-amd64-$(TAG).tar.gz -C dist/linux/amd64 $(APPNAME)
|
tar -cvzf $(APPNAME)-linux-amd64-$(TAG).tar.gz -C dist/linux/amd64 $(APPNAME)
|
||||||
# tar -cvzf cloudconfd-linux-i386-i386$(TAG).tar.gz -C dist/linux/i386 $(APPNAME)
|
# tar -cvzf $(APPNAME)-linux-i386-i386$(TAG).tar.gz -C dist/linux/i386 $(APPNAME)
|
||||||
|
|
||||||
|
|
16
test
Executable file
16
test
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Test bad URL"
|
||||||
|
curl -H "Content-Type: application/json" \
|
||||||
|
--data @assets/bitbucket.json \
|
||||||
|
http://localhost:8080/bad/action
|
||||||
|
|
||||||
|
echo "Test Bitbucket hook"
|
||||||
|
curl -H "Content-Type: application/json" \
|
||||||
|
--data @assets/bitbucket.json \
|
||||||
|
http://localhost:8080/bitbucket/echo
|
||||||
|
|
||||||
|
echo "Test Github hook"
|
||||||
|
curl -H "Content-Type: application/json" \
|
||||||
|
--data @assets/github.json \
|
||||||
|
http://localhost:8080/github/echo
|
Loading…
Reference in New Issue
Block a user