Skip to content

Commit

Permalink
adding back tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sethiay committed Jun 24, 2024
1 parent dd52e70 commit 143700a
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ func TestCacheFileForRangeReadFalseTest(t *testing.T) {
// Define flag set to run the tests.
flagsSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet,
"--config-file="+createConfigFile(cacheCapacityForRangeReadTestInMiB, false, configFileName, false))
flagsSet = append(flagsSet, []string{"--implicit-dirs", "--config-file=" + createConfigFile(cacheCapacityForRangeReadTestInMiB,
false, configFileName, true)})

// Run tests.
for _, flags := range flagsSet {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ func TestCacheFileForRangeReadTrueTest(t *testing.T) {
// Define flag set to run the tests.
flagsSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet,
"--config-file="+createConfigFile(cacheCapacityForRangeReadTestInMiB, true, configFileName, false))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func TestDisabledCacheTTLTest(t *testing.T) {
// Define flag set to run the tests.
flagsSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--config-file="+createConfigFile(cacheCapacityInMB, false, configFileName,
false))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ func TestLocalModificationTest(t *testing.T) {
// Define flag set to run the tests.
flagsSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--config-file="+createConfigFile(cacheCapacityInMB, false,
configFileName, false))
flagsSet = append(flagsSet, []string{"--implicit-dirs", "--config-file=" + createConfigFile(cacheCapacityInMB,
false, configFileName, true)})

// Run tests.
for _, flags := range flagsSet {
Expand Down
3 changes: 2 additions & 1 deletion tools/integration_tests/read_cache/range_read_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,12 @@ func TestRangeReadTest(t *testing.T) {
// Define flag set to run the tests.
flagSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagSet,
"--config-file="+createConfigFile(cacheCapacityForVeryLargeFileInMiB, false, configFileName+"1", false),
"--config-file="+createConfigFile(cacheCapacityForVeryLargeFileInMiB, true, configFileName+"2", false))
flagSet = append(flagSet, []string{"--implicit-dirs", "--config-file=" + createConfigFile(cacheCapacityForVeryLargeFileInMiB,
false, configFileName+"3", true)})

// Run tests.
for _, flags := range flagSet {
Expand Down
3 changes: 2 additions & 1 deletion tools/integration_tests/read_cache/read_only_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ func TestReadOnlyTest(t *testing.T) {
// Define flag set to run the tests.
flagsSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet,
"--config-file="+createConfigFile(cacheCapacityInMB, false, configFileName+"1", false),
"--config-file="+createConfigFile(cacheCapacityInMB, true, configFileName+"2", false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--o=ro", "")
flagsSet = append(flagsSet, []string{"--implicit-dirs", "--o=ro", "--config-file=" + createConfigFile(cacheCapacityInMB,
false, configFileName+"3", true)})

// Run tests.
for _, flags := range flagsSet {
Expand Down
3 changes: 2 additions & 1 deletion tools/integration_tests/read_cache/remount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ func TestRemountTest(t *testing.T) {
// Define flag set to run the tests.
flagsSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--config-file="+createConfigFile(cacheCapacityInMB, false, configFileName, false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--o=ro", "")
flagsSet = append(flagsSet, []string{"--implicit-dirs", "--config-file=" + createConfigFile(cacheCapacityInMB,
false, configFileName, true)})

// Create storage client before running tests.
ts := &remountTest{ctx: context.Background()}
Expand Down
4 changes: 2 additions & 2 deletions tools/integration_tests/read_cache/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ const (
offsetEndOfFile = veryLargeFileSize - 1*util.MiB
cacheDirName = "cache-dir"
logFileNameForMountedDirectoryTests = "/tmp/gcsfuse_read_cache_test_logs/log.json"
downloadParallelismPerFile = 5
downloadParallelismPerFile = 4
maxDownloadParallelism = -1
readRequestSizeMB = 4
readRequestSizeMB = 2
enableCrcCheck = true
)

Expand Down
3 changes: 2 additions & 1 deletion tools/integration_tests/read_cache/small_cache_ttl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,13 @@ func TestSmallCacheTTLTest(t *testing.T) {
// Define flag set to run the tests.
flagsSet := [][]string{
{"--implicit-dirs=true"},
{"--implicit-dirs=false"},
}
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--config-file="+createConfigFile(cacheCapacityInMB, false,
configFileName, false))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, fmt.Sprintf("--stat-cache-ttl=%ds", metadataCacheTTlInSec))
setup.AppendFlagsToAllFlagsInTheFlagsSet(&flagsSet, "--o=ro", "")
flagsSet = append(flagsSet, []string{fmt.Sprintf("--stat-cache-ttl=%ds", metadataCacheTTlInSec), "--config-file=" + createConfigFile(cacheCapacityInMB,
false, configFileName+"3", true)})

// Run tests.
for _, flags := range flagsSet {
Expand Down

0 comments on commit 143700a

Please sign in to comment.