Skip to content

Commit

Permalink
remove unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tulsishah committed Aug 21, 2024
1 parent e6544e0 commit 92e88a4
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions cmd/legacy_param_mapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,58 +644,6 @@ func TestLogSeverityRationalization(t *testing.T) {
}
}

func TestEnableEmptyManagedFoldersRationalization(t *testing.T) {
testcases := []struct {
name string
enableHns bool
enableEmptyManagedFolders bool
expectedEnableEmptyManagedFolders bool
}{
{
name: "both enable-hns and enable-empty-managed-folders set to true",
enableHns: true,
enableEmptyManagedFolders: true,
expectedEnableEmptyManagedFolders: true,
},
{
name: "enable-hns set to true and enable-empty-managed-folders set to false",
enableHns: true,
enableEmptyManagedFolders: false,
expectedEnableEmptyManagedFolders: true,
},
{
name: "enable-hns set to false and enable-empty-managed-folders set to true",
enableHns: false,
enableEmptyManagedFolders: true,
expectedEnableEmptyManagedFolders: true,
},
{
name: "both enable-hns and enable-empty-managed-folders set to false",
enableHns: false,
enableEmptyManagedFolders: false,
expectedEnableEmptyManagedFolders: false,
},
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
flags := &flagStorage{
ClientProtocol: mountpkg.ClientProtocol("http1"),
SequentialReadSizeMb: 200,
ExperimentalMetadataPrefetchOnMount: "disabled",
}
c := config.NewMountConfig()
c.EnableHNS = tc.enableHns
c.ListConfig.EnableEmptyManagedFolders = tc.enableEmptyManagedFolders

resolvedConfig, err := PopulateNewConfigFromLegacyFlagsAndConfig(&mockCLIContext{}, flags, c)

if assert.NoError(t, err) {
assert.Equal(t, tc.expectedEnableEmptyManagedFolders, resolvedConfig.List.EnableEmptyManagedFolders)
}
})
}
}

func TestPopulateConfigFromLegacyFlags_MountOption(t *testing.T) {
flags := &flagStorage{
MountOptions: []string{"rw,nodev", "user=jacobsa,noauto"},
Expand Down

0 comments on commit 92e88a4

Please sign in to comment.