Skip to content

Commit

Permalink
Override resource prefix used for sweeping at link time to prevent Je…
Browse files Browse the repository at this point in the history
…nkins and adhoc test runs from conflicting

Signed-off-by: Dom Del Nano <[email protected]>
(cherry picked from commit 206be7097509dbc4493f76f29f0622f1a8d597c8)
  • Loading branch information
ddelnano committed Mar 7, 2024
1 parent 2ade3ba commit 3df97fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
TIMEOUT ?= 40m
GOMAXPROCS ?= 5
TF_VERSION ?= v0.14.11
ROOT_PKG_PATH := github.com/ddelnano/terraform-provider-xenorchestra
ifdef TEST
TEST := github.com/ddelnano/terraform-provider-xenorchestra/xoa -run '$(TEST)'
else
Expand Down Expand Up @@ -35,10 +36,10 @@ sweep:
test: testclient testacc

testclient:
cd client; go test $(TEST) -v -count 1
cd client; go test $(TEST) -v -count 1 -ldflags "-X $(ROOT_PKG_PATH)/client.integrationTestPrefix=adhoc-xo-go-client"

testacc: xoa/testdata/alpine-virt-3.17.0-x86_64.iso
TF_ACC=1 $(TF_LOG) go test $(TEST) -parallel $(GOMAXPROCS) -v -count 1 -timeout $(TIMEOUT) -sweep=true
TF_ACC=1 $(TF_LOG) go test $(TEST) -parallel $(GOMAXPROCS) -v -count 1 -timeout $(TIMEOUT) -sweep=true -ldflags "-X $(ROOT_PKG_PATH)/xoa.accTestPrefix=adhoc-terraform-acc"

# This file was previously stored in the git repo with git lfs. GitHub
# has a very low quota for number of allowed clones and so this needed
Expand Down
2 changes: 1 addition & 1 deletion client/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func CreateNetwork(network *Network) {
*network = *net
}

var integrationTestPrefix string = "xenorchestra-client-"
var integrationTestPrefix string = "xo-go-client-"
var accTestPool Pool
var accTestHost Host
var accDefaultSr StorageRepository
Expand Down

0 comments on commit 3df97fd

Please sign in to comment.