Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
  • Loading branch information
ddelnano committed Mar 14, 2024
1 parent 1d98239 commit a94a741
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pipeline {
stages {
stage('Test') {
environment {
BYPASS_XOA_TOKEN = sh(script: "xo-cli --createToken $XOA_URL $XOA_USER $XOA_PASSWORD | tail -n1", returnStdout: true)
BYPASS_XOA_TOKEN = sh(script: "xo-cli --createToken $XOA_URL $XOA_USER $XOA_PASSWORD | tail -n1", returnStdout: true).trim()
}
steps {
lock('xoa-test-runner') {
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ testacc: xoa/testdata/alpine-virt-3.17.0-x86_64.iso
# to be removed from the repo. Add a target to enforce that the CI system
# has copied that file into place before the tests run
ci: xoa/testdata/alpine-virt-3.17.0-x86_64.iso
TF_ACC_TERRAFORM_PATH=/opt/terraform-provider-xenorchestra/bin/$(TF_VERSION) TF_ACC=1 gotestsum --debug --rerun-fails=5 --max-fails=15 --packages=./xoa -- ./xoa -v -count=1 -timeout=$(TIMEOUT) -sweep=true -parallel=$(GOMAXPROCS) -run TestAccXenorchestraDataSource_hostXoTokenAuth
TF_LOG=INFO TF_ACC_TERRAFORM_PATH=/opt/terraform-provider-xenorchestra/bin/$(TF_VERSION) TF_ACC=1 gotestsum --debug --rerun-fails=5 --max-fails=15 --packages=./xoa -- ./xoa -v -count=1 -timeout=$(TIMEOUT) -sweep=true -parallel=$(GOMAXPROCS) -run TestAccXenorchestraDataSource_hostXoTokenAuth
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func (c *Client) Call(method string, params, result interface{}) error {
} else {
callRes = reflect.ValueOf(result).Elem()
}
log.Printf("[TRACE] Made rpc call `%s` with params: %v and received %+v: result with error: %v\n", method, params, callRes, err)
log.Printf("[INFO] Made rpc call `%s` with params: %v and received %+v: result with error: %v\n", method, params, callRes, err)

if err != nil {
rpcErr, ok := err.(*jsonrpc2.Error)
Expand Down
1 change: 0 additions & 1 deletion xoa/acc_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ var disklessTestTemplate client.Template
var testIso client.VDI

func TestMain(m *testing.M) {
fmt.Printf("Found token of len=%d\n", len(accTestXoToken))
// This leverages the existing flag defined in the terraform-plugin-sdk
// repo defined below
// https://github.com/hashicorp/terraform-plugin-sdk/blob/2c03a32a9d1be63a12eb18aaf12d2c5270c42346/helper/resource/testing.go#L58
Expand Down

0 comments on commit a94a741

Please sign in to comment.