Skip to content

Commit

Permalink
Execute gcsfuse testsuite version fetcher command separately.
Browse files Browse the repository at this point in the history
Change-Id: I3a0e8d5e104270238b84f9b530b8c382a757bba2
  • Loading branch information
hime committed Jan 28, 2025
1 parent d577530 commit ec59d47
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/e2e/testsuites/gcsfuse_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const (

var gcsfuseVersionStr = ""

const gcsfuseGoVersionCommand = `GO_VERSION=$(grep -o 'go[0-9]\+\.[0-9]\+\.[0-9]\+' ./gcsfuse/tools/cd_scripts/e2e_test.sh | cut -c3-)`
const gcsfuseGoVersionCommand = `grep -o 'go[0-9]\+\.[0-9]\+\.[0-9]\+' ./gcsfuse/tools/cd_scripts/e2e_test.sh | cut -c3-`

func hnsEnabled(driver storageframework.TestDriver) bool {
gcsfuseCSITestDriver, ok := driver.(*specs.GCSFuseCSITestDriver)
Expand Down Expand Up @@ -238,9 +238,12 @@ func (t *gcsFuseCSIGCSFuseIntegrationTestSuite) DefineTests(driver storageframew
tPod.VerifyExecInPodSucceed(f, specs.TesterContainerName, "ln -s /usr/bin/python3 /usr/bin/python")
tPod.VerifyExecInPodSucceedWithFullOutput(f, specs.TesterContainerName, "apt-get update && apt-get install -y google-cloud-cli")

ginkgo.By("Getting gcsfuse testsuite go version")
gcsfuseTestSuiteVersion := tPod.VerifyExecInPodSucceedWithOutput(f, specs.TesterContainerName, gcsfuseGoVersionCommand)

ginkgo.By("Checking that the gcsfuse integration tests exits with no error")

baseTestCommand := fmt.Sprintf("export %v && export GOTOOLCHAIN=go$GO_VERSION && export PATH=$PATH:/usr/local/go/bin && cd %v/%v && GODEBUG=asyncpreemptoff=1 go test . -p 1 --integrationTest -v --mountedDirectory=%v", gcsfuseGoVersionCommand, gcsfuseIntegrationTestsBasePath, testName, mountPath)
baseTestCommand := fmt.Sprintf("export GOTOOLCHAIN=go%v && export PATH=$PATH:/usr/local/go/bin && cd %v/%v && GODEBUG=asyncpreemptoff=1 go test . -p 1 --integrationTest -v --mountedDirectory=%v", gcsfuseTestSuiteVersion, gcsfuseIntegrationTestsBasePath, testName, mountPath)
baseTestCommandWithTestBucket := baseTestCommand + fmt.Sprintf(" --testbucket=%v", bucketName)

var finalTestCommand string
Expand Down

0 comments on commit ec59d47

Please sign in to comment.