From 8de23df1653db39c96f62f7080ab5fe1dea0c0c2 Mon Sep 17 00:00:00 2001 From: hime Date: Wed, 16 Oct 2024 04:37:48 +0000 Subject: [PATCH] Create symbolic link using privileges. --- test/e2e/testsuites/gcsfuse_integration.go | 3 ++- test/e2e/testsuites/gcsfuse_integration_file_cache.go | 3 ++- .../gcsfuse_integration_file_cache_parallel_downloads.go | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/e2e/testsuites/gcsfuse_integration.go b/test/e2e/testsuites/gcsfuse_integration.go index 92693721..58f21589 100644 --- a/test/e2e/testsuites/gcsfuse_integration.go +++ b/test/e2e/testsuites/gcsfuse_integration.go @@ -224,10 +224,11 @@ func (t *gcsFuseCSIGCSFuseIntegrationTestSuite) DefineTests(driver storageframew tPod.VerifyExecInPodSucceed(f, specs.TesterContainerName, "apt-get install -y apt-transport-https ca-certificates gnupg curl") tPod.VerifyExecInPodSucceed(f, specs.TesterContainerName, "curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg") tPod.VerifyExecInPodSucceed(f, specs.TesterContainerName, "echo 'deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main' | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list") + 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("Checking that the gcsfuse integration tests exits with no error") - baseTestCommand := fmt.Sprintf("ln -s /usr/bin/python3 /usr/bin/python && export GOTOOLCHAIN=go1.23.2 && export PATH=$PATH:/usr/local/go/bin && cd %v/%v && GODEBUG=asyncpreemptoff=1 go test . -p 1 --integrationTest -v --mountedDirectory=%v", gcsfuseIntegrationTestsBasePath, testName, mountPath) + baseTestCommand := fmt.Sprintf("export GOTOOLCHAIN=go1.23.2 && export PATH=$PATH:/usr/local/go/bin && cd %v/%v && GODEBUG=asyncpreemptoff=1 go test . -p 1 --integrationTest -v --mountedDirectory=%v", gcsfuseIntegrationTestsBasePath, testName, mountPath) baseTestCommandWithTestBucket := baseTestCommand + fmt.Sprintf(" --testbucket=%v", bucketName) var finalTestCommand string diff --git a/test/e2e/testsuites/gcsfuse_integration_file_cache.go b/test/e2e/testsuites/gcsfuse_integration_file_cache.go index 391d5270..9d70daff 100644 --- a/test/e2e/testsuites/gcsfuse_integration_file_cache.go +++ b/test/e2e/testsuites/gcsfuse_integration_file_cache.go @@ -167,8 +167,9 @@ func (t *gcsFuseCSIGCSFuseIntegrationFileCacheTestSuite) DefineTests(driver stor ginkgo.By("Checking that the gcsfuse integration tests exits with no error") tPod.VerifyExecInPodSucceed(f, specs.TesterContainerName, fmt.Sprintf("git clone --branch %v https://github.com/GoogleCloudPlatform/gcsfuse.git", gcsfuseTestBranch)) + tPod.VerifyExecInPodSucceed(f, specs.TesterContainerName, "ln -s /usr/bin/python3 /usr/bin/python") - baseTestCommand := fmt.Sprintf("ln -s /usr/bin/python3 /usr/bin/python && export GOTOOLCHAIN=go1.23.2 && export PATH=$PATH:/usr/local/go/bin && cd %v/read_cache && GODEBUG=asyncpreemptoff=1 go test . -p 1 --integrationTest -v --mountedDirectory=%v --testbucket=%v -run %v", gcsfuseIntegrationTestsBasePath, mountPath, bucketName, testName) + baseTestCommand := fmt.Sprintf("export GOTOOLCHAIN=go1.23.2 && export PATH=$PATH:/usr/local/go/bin && cd %v/read_cache && GODEBUG=asyncpreemptoff=1 go test . -p 1 --integrationTest -v --mountedDirectory=%v --testbucket=%v -run %v", gcsfuseIntegrationTestsBasePath, mountPath, bucketName, testName) tPod.VerifyExecInPodSucceedWithFullOutput(f, specs.TesterContainerName, baseTestCommand) } diff --git a/test/e2e/testsuites/gcsfuse_integration_file_cache_parallel_downloads.go b/test/e2e/testsuites/gcsfuse_integration_file_cache_parallel_downloads.go index 0f5bd05d..0a385500 100644 --- a/test/e2e/testsuites/gcsfuse_integration_file_cache_parallel_downloads.go +++ b/test/e2e/testsuites/gcsfuse_integration_file_cache_parallel_downloads.go @@ -173,8 +173,9 @@ func (t *gcsFuseCSIGCSFuseIntegrationFileCacheParallelDownloadsTestSuite) Define ginkgo.By("Checking that the gcsfuse integration tests exits with no error") tPod.VerifyExecInPodSucceed(f, specs.TesterContainerName, fmt.Sprintf("git clone --branch %v https://github.com/GoogleCloudPlatform/gcsfuse.git", gcsfuseTestBranch)) + tPod.VerifyExecInPodSucceed(f, specs.TesterContainerName, "ln -s /usr/bin/python3 /usr/bin/python") - baseTestCommand := fmt.Sprintf("ln -s /usr/bin/python3 /usr/bin/python && export GOTOOLCHAIN=go1.23.2 && export PATH=$PATH:/usr/local/go/bin && cd %v/read_cache && GODEBUG=asyncpreemptoff=1 go test . -p 1 --integrationTest -v --mountedDirectory=%v --testbucket=%v -run %v", gcsfuseIntegrationTestsBasePath, mountPath, bucketName, testName) + baseTestCommand := fmt.Sprintf("export GOTOOLCHAIN=go1.23.2 && export PATH=$PATH:/usr/local/go/bin && cd %v/read_cache && GODEBUG=asyncpreemptoff=1 go test . -p 1 --integrationTest -v --mountedDirectory=%v --testbucket=%v -run %v", gcsfuseIntegrationTestsBasePath, mountPath, bucketName, testName) tPod.VerifyExecInPodSucceedWithFullOutput(f, specs.TesterContainerName, baseTestCommand) }