diff --git a/tools/integration_tests/local_file/local_file_test.go b/tools/integration_tests/local_file/local_file_test.go index 07d5eb94af..0f51343515 100644 --- a/tools/integration_tests/local_file/local_file_test.go +++ b/tools/integration_tests/local_file/local_file_test.go @@ -34,7 +34,8 @@ import ( ) const ( - testDirName = "LocalFileTest" + testDirName = "LocalFileTest" + onlyDirMounted = "OnlyDirMountLocalFiles" ) var ( @@ -109,7 +110,7 @@ func TestMain(m *testing.M) { successCode := static_mounting.RunTests(flagsSet, m) if successCode == 0 { - successCode = only_dir_mounting.RunTests(flagsSet, m) + successCode = only_dir_mounting.RunTests(flagsSet, onlyDirMounted, m) } if successCode == 0 { diff --git a/tools/integration_tests/operations/operations_test.go b/tools/integration_tests/operations/operations_test.go index 90851f7f20..f16ffe82df 100644 --- a/tools/integration_tests/operations/operations_test.go +++ b/tools/integration_tests/operations/operations_test.go @@ -85,6 +85,7 @@ const PrefixFileInDirThreeInCreateThreeLevelDirTest = "fileInDirThreeInCreateThr const FileInDirThreeInCreateThreeLevelDirTest = "fileInDirThreeInCreateThreeLevelDirTest1" const ContentInFileInDirThreeInCreateThreeLevelDirTest = "Hello world!!" const Content = "line 1\nline 2\n" +const onlyDirMounted = "OnlyDirMountOperations" func createMountConfigsAndEquivalentFlags() (flags [][]string) { cacheDirPath := path.Join(os.Getenv("HOME"), "cache-dri") @@ -154,7 +155,7 @@ func TestMain(m *testing.M) { successCode := static_mounting.RunTests(flagsSet, m) if successCode == 0 { - successCode = only_dir_mounting.RunTests(flagsSet, m) + successCode = only_dir_mounting.RunTests(flagsSet, onlyDirMounted, m) } if successCode == 0 { diff --git a/tools/integration_tests/read_cache/setup_test.go b/tools/integration_tests/read_cache/setup_test.go index 2858c32fdc..5fb3fb5f57 100644 --- a/tools/integration_tests/read_cache/setup_test.go +++ b/tools/integration_tests/read_cache/setup_test.go @@ -33,7 +33,7 @@ import ( const ( testDirName = "ReadCacheTest" - onlyDirMounted = "Test" + onlyDirMounted = "OnlyDirMountReadCache" cacheSubDirectoryName = "gcsfuse-file-cache" smallContentSize = 128 * util.KiB chunkSizeToRead = 128 * util.KiB diff --git a/tools/integration_tests/rename_dir_limit/rename_dir_limit_test.go b/tools/integration_tests/rename_dir_limit/rename_dir_limit_test.go index 0f37279483..1e32cba006 100644 --- a/tools/integration_tests/rename_dir_limit/rename_dir_limit_test.go +++ b/tools/integration_tests/rename_dir_limit/rename_dir_limit_test.go @@ -36,6 +36,7 @@ const EmptySubDirectory = "emptySubDirectory" const NonEmptySubDirectory = "nonEmptySubDirectory" const RenamedDirectory = "renamedDirectory" const PrefixTempFile = "temp" +const onlyDirMounted = "OnlyDirMountRenameDirLimit" func TestMain(m *testing.M) { setup.ParseSetUpFlags() @@ -58,7 +59,7 @@ func TestMain(m *testing.M) { successCode := static_mounting.RunTests(flags, m) if successCode == 0 { - successCode = only_dir_mounting.RunTests(flags, m) + successCode = only_dir_mounting.RunTests(flags, onlyDirMounted, m) } if successCode == 0 { diff --git a/tools/integration_tests/util/mounting/only_dir_mounting/only_dir_mounting.go b/tools/integration_tests/util/mounting/only_dir_mounting/only_dir_mounting.go index d4f03324a9..e8f6c8bd65 100644 --- a/tools/integration_tests/util/mounting/only_dir_mounting/only_dir_mounting.go +++ b/tools/integration_tests/util/mounting/only_dir_mounting/only_dir_mounting.go @@ -56,10 +56,10 @@ func mountGcsFuseForFlagsAndExecuteTests(flags [][]string, m *testing.M) (succes return } -func executeTestsForOnlyDirMounting(flags [][]string, m *testing.M) (successCode int) { +func executeTestsForOnlyDirMounting(flags [][]string, dirName string, m *testing.M) (successCode int) { // Set onlyDirMounted value to the directory being mounted. - setup.SetOnlyDirMounted(DirectoryInTestBucket) - mountDirInBucket := path.Join(setup.TestBucket(), DirectoryInTestBucket) + setup.SetOnlyDirMounted(dirName) + mountDirInBucket := path.Join(setup.TestBucket(), dirName) // Clean the bucket. setup.RunScriptForTestData("../util/mounting/only_dir_mounting/testdata/delete_objects.sh", mountDirInBucket) @@ -84,10 +84,10 @@ func executeTestsForOnlyDirMounting(flags [][]string, m *testing.M) (successCode return } -func RunTests(flags [][]string, m *testing.M) (successCode int) { +func RunTests(flags [][]string, dirName string, m *testing.M) (successCode int) { log.Println("Running only dir mounting tests...") - successCode = executeTestsForOnlyDirMounting(flags, m) + successCode = executeTestsForOnlyDirMounting(flags, dirName, m) log.Printf("Test log: %s\n", setup.LogFile())