Skip to content

Commit

Permalink
rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tulsishah committed May 1, 2024
1 parent d757f10 commit 78d6313
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions internal/storage/storage_handle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,23 @@ func (t *StorageHandleTest) TestNewStorageHandleWithGRPCClientWithCustomEndpoint
AssertTrue(strings.Contains(err.Error(), "GRPC client doesn't support auth for custom-endpoint. Please set anonymous-access: true via config-file."))
AssertEq(nil, handleCreated)
}

func TestCreateGRPCControlClientHandle(t *testing.T) {
sc := storageutil.GetDefaultStorageClientConfig()
sc.ClientProtocol = mountpkg.GRPC

controlClient, err := createGRPCControlClientHandle(context.Background(), &sc)

AssertEq(nil, err)
AssertNe(nil, controlClient)
}

func TestCreateStorageHandleWithEnableHNSTrue(t *testing.T) {
sc := storageutil.GetDefaultStorageClientConfig()
sc.EnableHNS = true

sh, err := NewStorageHandle(context.Background(), sc)

AssertEq(nil, err)
AssertNe(nil, sh)
}
1 change: 1 addition & 0 deletions internal/storage/storageutil/test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ func GetDefaultStorageClientConfig() (clientConfig StorageClientConfig) {
ReuseTokenFromUrl: true,
ExperimentalEnableJsonRead: false,
AnonymousAccess: true,
EnableHNS: false,
}
}

0 comments on commit 78d6313

Please sign in to comment.