From 6d54649df7b9ba807a5ae7b20446c2a26c133fc4 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Wed, 28 Apr 2021 14:10:15 +0000 Subject: [PATCH] feat: negotiate smb version --- pkg/azurefile/azurefile.go | 2 -- pkg/azurefile/azurefile_test.go | 6 ------ 2 files changed, 8 deletions(-) diff --git a/pkg/azurefile/azurefile.go b/pkg/azurefile/azurefile.go index 1212ebf7c9..0911dc8d2b 100644 --- a/pkg/azurefile/azurefile.go +++ b/pkg/azurefile/azurefile.go @@ -63,7 +63,6 @@ const ( mfsymlinks = "mfsymlinks" defaultFileMode = "0777" defaultDirMode = "0777" - defaultVers = "3.0" defaultActimeo = "30" // See https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata#share-names @@ -302,7 +301,6 @@ func appendDefaultMountOptions(mountOptions []string) []string { var defaultMountOptions = map[string]string{ fileMode: defaultFileMode, dirMode: defaultDirMode, - vers: defaultVers, actimeo: defaultActimeo, mfsymlinks: "", } diff --git a/pkg/azurefile/azurefile_test.go b/pkg/azurefile/azurefile_test.go index 5fc5bf89d4..9e147b2071 100644 --- a/pkg/azurefile/azurefile_test.go +++ b/pkg/azurefile/azurefile_test.go @@ -70,7 +70,6 @@ func TestAppendDefaultMountOptions(t *testing.T) { options: []string{"dir_mode=0777"}, expected: []string{"dir_mode=0777", fmt.Sprintf("%s=%s", fileMode, defaultFileMode), - fmt.Sprintf("%s=%s", vers, defaultVers), fmt.Sprintf("%s=%s", actimeo, defaultActimeo), mfsymlinks, }, @@ -79,7 +78,6 @@ func TestAppendDefaultMountOptions(t *testing.T) { options: []string{"file_mode=0777"}, expected: []string{"file_mode=0777", fmt.Sprintf("%s=%s", dirMode, defaultDirMode), - fmt.Sprintf("%s=%s", vers, defaultVers), fmt.Sprintf("%s=%s", actimeo, defaultActimeo), mfsymlinks, }, @@ -97,7 +95,6 @@ func TestAppendDefaultMountOptions(t *testing.T) { options: []string{"file_mode=0777", "dir_mode=0777"}, expected: []string{ "file_mode=0777", "dir_mode=0777", - fmt.Sprintf("%s=%s", vers, defaultVers), fmt.Sprintf("%s=%s", actimeo, defaultActimeo), mfsymlinks, }, @@ -108,7 +105,6 @@ func TestAppendDefaultMountOptions(t *testing.T) { "actimeo=3", fmt.Sprintf("%s=%s", fileMode, defaultFileMode), fmt.Sprintf("%s=%s", dirMode, defaultDirMode), - fmt.Sprintf("%s=%s", vers, defaultVers), mfsymlinks, }, }, @@ -118,7 +114,6 @@ func TestAppendDefaultMountOptions(t *testing.T) { mfsymlinks, fmt.Sprintf("%s=%s", fileMode, defaultFileMode), fmt.Sprintf("%s=%s", dirMode, defaultDirMode), - fmt.Sprintf("%s=%s", vers, defaultVers), fmt.Sprintf("%s=%s", actimeo, defaultActimeo), }, }, @@ -127,7 +122,6 @@ func TestAppendDefaultMountOptions(t *testing.T) { expected: []string{"", fmt.Sprintf("%s=%s", fileMode, defaultFileMode), fmt.Sprintf("%s=%s", dirMode, defaultDirMode), - fmt.Sprintf("%s=%s", vers, defaultVers), fmt.Sprintf("%s=%s", actimeo, defaultActimeo), mfsymlinks, },