github.com/econnell/deis@v1.5.1/tests/Makefile (about) 1 include ../includes.mk 2 3 # the filepath to this repository, relative to $GOPATH/src 4 repo_path = github.com/deis/deis/tests 5 6 GO_FILES = apps_test.go auth_test.go builds_test.go config_test.go integration_test.go \ 7 keys_test.go limits_test.go main.go perms_test.go ps_test.go releases_test.go \ 8 smoke_test.go tags_test.go 9 GO_PACKAGES = dockercli etcdutils mock utils 10 GO_PACKAGES_REPO_PATH = $(addprefix $(repo_path)/,$(GO_PACKAGES)) 11 12 MOCK_STORE_IMAGE = $(IMAGE_PREFIX)mock-store:latest 13 TEST_ETCD_IMAGE = $(IMAGE_PREFIX)test-etcd:latest 14 TEST_POSTGRESQL_IMAGE = $(IMAGE_PREFIX)test-postgresql:latest 15 16 test: test-smoke 17 18 test-smoke: test-style 19 godep go test -tags integration -short -timeout 20m -v -run TestSmoke 20 21 test-full: test-style 22 godep go test -tags integration -v -run TestGlobal 23 godep go test -tags integration -v -run TestApps 24 godep go test -tags integration -v -run TestAuth 25 godep go test -tags integration -v -run TestBuilds 26 godep go test -tags integration -v -run TestConfig 27 godep go test -tags integration -v -run TestDomains 28 godep go test -tags integration -v -run TestKeys 29 godep go test -tags integration -v -run TestPerms 30 godep go test -tags integration -v -run TestPs 31 godep go test -tags integration -v -run TestReleases 32 33 setup-root-gotools: 34 sudo GOPATH=/tmp/tmpGOPATH go get -u -v code.google.com/p/go.tools/cmd/cover 35 sudo GOPATH=/tmp/tmpGOPATH go get -u -v code.google.com/p/go.tools/cmd/vet 36 sudo rm -rf /tmp/tmpGOPATH 37 38 setup-gotools: 39 go get -v github.com/golang/lint/golint 40 41 mock-store: 42 docker build -t $(MOCK_STORE_IMAGE) fixtures/mock-store/ 43 44 test-etcd: 45 docker build -t $(TEST_ETCD_IMAGE) fixtures/test-etcd/ 46 47 test-postgresql: 48 docker build -t $(TEST_POSTGRESQL_IMAGE) fixtures/test-postgresql/ 49 50 test-style: 51 # display output, then check 52 $(GOFMT) $(GO_PACKAGES) $(GO_FILES) 53 @$(GOFMT) $(GO_PACKAGES) $(GO_FILES) | read; if [ $$? == 0 ]; then echo "gofmt check failed."; exit 1; fi 54 $(GOVET) $(repo_path) $(GO_PACKAGES_REPO_PATH) 55 $(GOLINT) ./... 56 57 nuke_from_orbit: 58 -docker kill `docker ps -q` 59 -docker rm -v `docker ps -a -q` 60 -docker rmi -f `docker images -q`