Skip to content

Commit

Permalink
Add testtags
Browse files Browse the repository at this point in the history
  • Loading branch information
EliiseS committed Jul 15, 2020
1 parent 9cc7d59 commit 77a7add
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TEST?=$$(go list ./... |grep -v 'vendor')
WEBSITE_REPO=github.com/hashicorp/terraform-website
PKG_NAME=azuredevops
TESTTIMEOUT=180m
TESTTAGS=all

ifeq ($(GOPATH),)
GOPATH:=$(shell go env GOPATH)
Expand Down Expand Up @@ -45,11 +46,11 @@ test: fmtcheck

testacc: fmtcheck
@echo "==> Sourcing .env file if avaliable"
if [ -f .env ]; then set -o allexport; source .env; set +o allexport; fi
TF_ACC=1 go test -tags "all" $(TEST) -v $(TESTARGS) -timeout 120m
if [ -f .env ]; then set -o allexport; . ./.env; set +o allexport; fi; \
TF_ACC=1 go test -tags "$(TESTTAGS)" $(TEST) -v $(TESTARGS) -timeout 120m

testacc-skip-tests: fmtcheck
TF_ACC=1 SKIP_NOT_SET_TESTS=1 go test -tags "all" $(TEST) -v $(TESTARGS) -timeout 120m
testacc-skip-tests: export SKIP_NOT_SET_TESTS=1
testacc-skip-tests: testacc

test-compile:
@if [ "$(TEST)" = "./..." ]; then \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ The several options to run the tests are:
* Run a subset using a prefix

```sh
make testacc TESTARGS='-run=TestAccBuildDefinitionBitbucket_Create'
make testacc TESTARGS='-run=TestAccBuildDefinitionBitbucket_Create' TESTTAGS='resource_build_definition'
```

* Run all tests, but skip tests that have missing additional environment variables
Expand Down

0 comments on commit 77a7add

Please sign in to comment.