Skip to content

Commit 4724c0b

Browse files
author
Alvar Viana
authored
test: Add make step to generate xml report for acceptance tests (#276)
* Prepare repo for tests and xml report
1 parent f655b89 commit 4724c0b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ website/vendor
3434
!command/test-fixtures/**/*.tfstate
3535
!command/test-fixtures/**/.terraform/
3636

37+
# Test reports
38+
junit-report.xml
39+
testacc-output.txt
40+
3741
# Keep windows files with windows line endings
3842
*.winfile eol=crlf
3943
/.vs

GNUmakefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ test: fmtcheck
3434
go test $(TEST) -timeout=30s -parallel=4
3535

3636
testacc: fmtcheck
37-
CGO_ENABLED=1 TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m -race
37+
CGO_ENABLED=1 TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m -race 2>&1 | tee testacc-output.txt
38+
39+
junit-report: testacc
40+
@go install github.com/jstemmer/go-junit-report/v2@latest
41+
@go-junit-report -in testacc-output.txt -out junit-report.xml
3842

3943
vet:
4044
@echo "go vet ."

0 commit comments

Comments
 (0)