-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathMakefile
45 lines (39 loc) · 2.35 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
default: install
.PHONY: install testacc testacc_srx testacc_router testacc_switch testunit cleanout changemd
# Install to use dev_overrides in provider_installation of Terraform
install:
go install
# Run acceptance tests
testacc/srx:
cd internal/providerfwk ; TESTACC_SRX=1 TF_ACC=1 go test -v --timeout 0 -coverprofile=../../coverage_fwk_srx.out $(TESTARGS)
go tool cover -html=coverage_fwk_srx.out
cd internal/providersdk ; TESTACC_SRX=1 TF_ACC=1 go test -v --timeout 0 -coverprofile=../../coverage_sdk_srx.out $(TESTARGS)
go tool cover -html=coverage_sdk_srx.out
testacc/upgradestate/srx:
cd internal/providerfwk ; TESTACC_UPGRADE_STATE=1 TESTACC_SRX=1 TF_ACC=1 go test -v --timeout 0 -coverprofile=../../coverage_fwk_upg_srx.out -run "TestAccUpgradeState" $(TESTARGS)
go tool cover -html=coverage_fwk_upg_srx.out
testacc/router:
cd internal/providerfwk ; TESTACC_ROUTER=1 TF_ACC=1 go test -v --timeout 0 -coverprofile=../../coverage_fwk_router.out $(TESTARGS)
go tool cover -html=coverage_fwk_router.out
cd internal/providersdk ; TESTACC_ROUTER=1 TF_ACC=1 go test -v --timeout 0 -coverprofile=../../coverage_sdk_router.out $(TESTARGS)
go tool cover -html=coverage_sdk_router.out
testacc/upgradestate/router:
cd internal/providerfwk ; TESTACC_UPGRADE_STATE=1 TESTACC_ROUTER=1 TF_ACC=1 go test -v --timeout 0 -coverprofile=../../coverage_fwk_upg_router.out -run "TestAccUpgradeState" $(TESTARGS)
go tool cover -html=coverage_fwk_upg_router.out
testacc/switch:
cd internal/providerfwk ; TESTACC_SWITCH=1 TF_ACC=1 go test -v --timeout 0 -coverprofile=../../coverage_fwk_switch.out $(TESTARGS)
go tool cover -html=coverage_fwk_switch.out
cd internal/providersdk ; TESTACC_SWITCH=1 TF_ACC=1 go test -v --timeout 0 -coverprofile=../../coverage_sdk_switch.out $(TESTARGS)
go tool cover -html=coverage_sdk_switch.out
testacc/upgradestate/switch:
cd internal/providerfwk ; TESTACC_UPGRADE_STATE=1 TESTACC_SWITCH=1 TF_ACC=1 go test -v --timeout 0 -coverprofile=../../coverage_fwk_upg_switch.out -run "TestAccUpgradeState" $(TESTARGS)
go tool cover -html=coverage_fwk_upg_switch.out
# Run unit tests
testunit:
go test -race -v -coverprofile=coverage_unit.out ./...
go tool cover -html=coverage_unit.out
# Cleanup out files from tests
cleanout:
find . -maxdepth 1 -name "*.out" -type f -delete
changemd:
cp .changes/.template.md .changes/$(shell git rev-parse --abbrev-ref HEAD).md