Skip to content

Commit 9f7726b

Browse files
committed
Allow override for running tests
1 parent 6dea731 commit 9f7726b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ VERSION=0.9.6
66
OS=$(shell go env GOOS)
77
ARCH=$(shell go env GOARCH)
88
OS_ARCH=${OS}_${ARCH}
9+
TEST_FILTER?=.*
910

1011
default: install
1112

@@ -40,7 +41,9 @@ setup:
4041
cd tools && go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
4142

4243
acctest:
43-
TF_ACC=1 PORT_CLIENT_ID=$(PORT_CLIENT_ID) PORT_CLIENT_SECRET=$(PORT_CLIENT_SECRET) PORT_BASE_URL=$(PORT_BASE_URL) go test -p 1 ./...
44+
# TEST_FILTER can be any regex, E.g: .*PageResource.*
45+
# TEST_FILTER='TestAccPortPageResource*' make acctest
46+
TF_ACC=1 PORT_CLIENT_ID=$(PORT_CLIENT_ID) PORT_CLIENT_SECRET=$(PORT_CLIENT_SECRET) PORT_BASE_URL=$(PORT_BASE_URL) go test -p 1 ./... -run "$(TEST_FILTER)"
4447

4548
gen-docs:
4649
tfplugindocs

0 commit comments

Comments
 (0)