Skip to content

Commit

Permalink
test on VM
Browse files Browse the repository at this point in the history
  • Loading branch information
Tulsishah committed Aug 22, 2024
1 parent c130207 commit 3a16b1d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tools/integration_tests/explicit_dir/explicit_dir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@
package explicit_dir_test

import (
"context"
"log"
"os"
"testing"
"time"

"cloud.google.com/go/storage"
"github.com/googlecloudplatform/gcsfuse/v2/tools/integration_tests/util/client"
"github.com/googlecloudplatform/gcsfuse/v2/tools/integration_tests/util/setup"
"github.com/googlecloudplatform/gcsfuse/v2/tools/integration_tests/util/setup/implicit_and_explicit_dir_setup"
)
Expand All @@ -28,6 +33,21 @@ const DirForExplicitDirTests = "dirForExplicitDirTests"
func TestMain(m *testing.M) {
setup.ParseSetUpFlags()

var storageClient *storage.Client
// Create storage client before running tests.
ctx := context.Background()
closeStorageClient := client.CreateStorageClientWithTimeOut(&ctx, &storageClient, time.Minute*15)
defer func() {
err := closeStorageClient()
if err != nil {
log.Fatalf("closeStorageClient failed: %v", err)
}
}()

if setup.IsHierarchicalBucket(ctx, storageClient) {
return
}

flags := [][]string{{"--implicit-dirs=false"}}

if !testing.Short() {
Expand Down
13 changes: 13 additions & 0 deletions tools/integration_tests/run_e2e_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@ TEST_DIR_HNS_GROUP=(
"operations"
"local_file"
"rename_dir_limit"
"log_rotation"
"mounting"
"read_cache"
"gzip"
"write_large_files"
"list_large_dir"
"read_large_files"
"implicit_dir"
"interrupt"
"operations"
"log_content"
"kernel_list_cache"
"concurrent_operations"
)

# Create a temporary file to store the log file name.
Expand Down

0 comments on commit 3a16b1d

Please sign in to comment.