Skip to content

Commit

Permalink
fix gcsfuse integration test write_large_files
Browse files Browse the repository at this point in the history
  • Loading branch information
songjiaxun committed Sep 14, 2023
1 parent 5c2df49 commit 5156f07
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/e2e/testsuites/gcsfuse_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ func (t *gcsFuseCSIGCSFuseIntegrationTestSuite) DefineTests(driver storageframew
tPod := specs.NewTestPod(f.ClientSet, f.Namespace)
tPod.SetImage(specs.GoogleCloudCliImage)
tPod.SetResource("1", "1Gi")
sidecarMemoryLimit := "256Mi"
if testName == "write_large_files" {
tPod.SetResource("1", "5Gi")
sidecarMemoryLimit = "512Mi"
}

mo := l.volumeResource.VolSource.CSI.VolumeAttributes["mountOptions"]
if testName == "explicit_dir" && strings.Contains(mo, "only-dir") {
Expand All @@ -103,7 +108,7 @@ func (t *gcsFuseCSIGCSFuseIntegrationTestSuite) DefineTests(driver storageframew
tPod.SetAnnotations(map[string]string{
"gke-gcsfuse/volumes": "true",
"gke-gcsfuse/cpu-limit": "250m",
"gke-gcsfuse/memory-limit": "256Mi",
"gke-gcsfuse/memory-limit": sidecarMemoryLimit,
"gke-gcsfuse/ephemeral-storage-limit": "2Gi",
})

Expand Down Expand Up @@ -141,7 +146,7 @@ func (t *gcsFuseCSIGCSFuseIntegrationTestSuite) DefineTests(driver storageframew
baseTestCommand := fmt.Sprintf("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)
switch testName {
case "explicit_dir", "implicit_dir", "readonly", "gzip":
case "explicit_dir", "implicit_dir", "readonly", "gzip", "write_large_files":
if testName == "readonly" && !readOnly {
tPod.VerifyExecInPodSucceedWithFullOutput(f, specs.TesterContainerName, fmt.Sprintf("chmod 777 %v/readonly && useradd -u 6666 -m test-user && su test-user -c '%v'", gcsfuseIntegrationTestsBasePath, baseTestCommandWithTestBucket))
} else {
Expand Down

0 comments on commit 5156f07

Please sign in to comment.