- updating the makefile

This commit is contained in:
Rohith 2016-10-01 23:18:21 +01:00
parent 161ca4c4b3
commit 4659c0648e
2 changed files with 11 additions and 4 deletions

View file

@ -66,15 +66,23 @@ format:
@echo "--> Running go fmt"
@go fmt $(PACKAGES)
gofmt:
@echo "--> Running gofmt check"
@gofmt -s -l *.go \
| grep -q \.go ; if [ $$? -eq 0 ]; then \
echo "You need to runn the make format, we have file unformatted"; \
gofmt -s -l *.go; \
exit 1; \
fi
cover:
@echo "--> Running go cover"
godep go list ./... | xargs -n1 go test --cover
@godep go test --cover
test: deps
@echo "--> Running the tests"
go test -v
@$(MAKE) gofmt
@$(MAKE) vet
@$(MAKE) cover
changelog: release
git log $(shell git tag | tail -n1)..HEAD --no-merges --format=%B > changelog

View file

@ -36,7 +36,6 @@ func TestSetResources(t *testing.T) {
assert.Nil(t, items.Set("pki:example-dot-com:common_name=blah.example.com,renew=true"))
assert.Nil(t, items.Set("secret:secrets/${ENV}/me:file=filename.test,fmt=yaml"))
assert.NotNil(t, items.Set("secret:"))
assert.NotNil(t, items.Set("secret:test:file=filename.test,fmt="))
assert.NotNil(t, items.Set("secret::file=filename.test,fmt=yaml"))