github.com/spg/deis@v1.7.3/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 godep go test -tags integration -v -run TestUsers 33 34 setup-root-gotools: 35 sudo GOPATH=/tmp/tmpGOPATH go get -u -v code.google.com/p/go.tools/cmd/cover 36 sudo GOPATH=/tmp/tmpGOPATH go get -u -v code.google.com/p/go.tools/cmd/vet 37 sudo rm -rf /tmp/tmpGOPATH 38 39 setup-gotools: 40 go get -v github.com/golang/lint/golint 41 42 mock-store: 43 docker build -t $(MOCK_STORE_IMAGE) fixtures/mock-store/ 44 45 test-etcd: 46 docker build -t $(TEST_ETCD_IMAGE) fixtures/test-etcd/ 47 48 test-postgresql: 49 docker build -t $(TEST_POSTGRESQL_IMAGE) fixtures/test-postgresql/ 50 51 test-style: 52 # display output, then check 53 $(GOFMT) $(GO_PACKAGES) $(GO_FILES) 54 @$(GOFMT) $(GO_PACKAGES) $(GO_FILES) | read; if [ $$? == 0 ]; then echo "gofmt check failed."; exit 1; fi 55 $(GOVET) $(repo_path) $(GO_PACKAGES_REPO_PATH) 56 $(GOLINT) ./... 57 58 nuke_from_orbit: 59 -docker kill `docker ps -q` 60 -docker rm -v `docker ps -a -q` 61 -docker rmi -f `docker images -q`