generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Makefile
32 lines (26 loc) · 901 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
TEST?=$$(go list ./... | grep -v 'vendor')
SWEEP_DIR?=./internal/sweep
SWEEP_ARGS?=
SWEEP_RUN?=all
HOSTNAME=hashicorp.com
NAMESPACE=harness
NAME=harness
VERSION=0.2
BINARY=terraform-provider-${NAME}
OS_ARCH=darwin_amd64
default: testacc
# Run acceptance tests
.PHONY: testacc
test:
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m
# build:
# go build -o ${BINARY}
# install: build
# mkdir -p ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
# mv ${BINARY} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
# test:
# go test $(TEST) || exit 1
# echo $(TEST) | xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
sweep:
@echo "WARNING: This will destroy infrastructure. Use only in development accounts."
go test $(SWEEP_DIR) -v -sweep=all $(SWEEPARGS) -timeout 60m