feat: Add minimal test script.

This commit is contained in:
Nicolas Carlier 2014-09-19 20:34:25 +00:00
parent 4917e72bd2
commit dbdd9f5776
2 changed files with 20 additions and 4 deletions

View File

@ -1,5 +1,5 @@
.SILENT :
.PHONY : build clean fmt
.PHONY : build clean
TAG:=`git describe --abbrev=0 --tags`
LDFLAGS:=-X main.buildVersion $(TAG)
@ -19,10 +19,10 @@ 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/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
# godep restore
tar -cvzf cloudconfd-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-amd64-$(TAG).tar.gz -C dist/linux/amd64 $(APPNAME)
# tar -cvzf $(APPNAME)-linux-i386-i386$(TAG).tar.gz -C dist/linux/i386 $(APPNAME)

16
test Executable file
View 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