Skip to content

Commit 2dde93c

Browse files
authored
Fix typo in 'mount directory does not exist' (#1633)
1 parent b98358a commit 2dde93c

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

cmd/mount.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (opt *mountOptions) validate(skipNonEmptyMount bool) error {
105105
}
106106

107107
if _, err := os.Stat(opt.MountPath); os.IsNotExist(err) {
108-
return fmt.Errorf("mount directory does not exists")
108+
return fmt.Errorf("mount directory does not exist")
109109
} else if common.IsDirectoryMounted(opt.MountPath) {
110110
// Try to cleanup the stale mount
111111
log.Info("Mount::validate : Mount directory is already mounted, trying to cleanup")
@@ -271,7 +271,7 @@ var mountCmd = &cobra.Command{
271271
if options.ConfigFile == "" {
272272
// Config file is not set in cli parameters
273273
// Blobfuse2 defaults to config.yaml in current directory
274-
// If the file does not exists then user might have configured required things in env variables
274+
// If the file does not exist then user might have configured required things in env variables
275275
// Fall back to defaults and let components fail if all required env variables are not set.
276276
_, err := os.Stat(common.DefaultConfigFilePath)
277277
if err != nil && os.IsNotExist(err) {

cmd/mount_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,18 @@ func (suite *mountTestSuite) cleanupTest() {
121121
common.DefaultLogFilePath = filepath.Join(common.DefaultWorkDir, "blobfuse2.log")
122122
}
123123

124-
// mount failure test where the mount directory does not exists
124+
// mount failure test where the mount directory does not exist
125125
func (suite *mountTestSuite) TestMountDirNotExists() {
126126
defer suite.cleanupTest()
127127

128128
tempDir := randomString(8)
129129
op, err := executeCommandC(rootCmd, "mount", tempDir, fmt.Sprintf("--config-file=%s", confFileMntTest))
130130
suite.assert.NotNil(err)
131-
suite.assert.Contains(op, "mount directory does not exists")
131+
suite.assert.Contains(op, "mount directory does not exist")
132132

133133
op, err = executeCommandC(rootCmd, "mount", "all", tempDir, fmt.Sprintf("--config-file=%s", confFileMntTest))
134134
suite.assert.NotNil(err)
135-
suite.assert.Contains(op, "mount directory does not exists")
135+
suite.assert.Contains(op, "mount directory does not exist")
136136
}
137137

138138
// mount failure test where the mount directory is not empty

cmd/unmount_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (suite *unmountTestSuite) cleanupTest() {
8787
time.Sleep(2 * time.Second)
8888
}
8989

90-
// mount failure test where the mount directory does not exists
90+
// mount failure test where the mount directory does not exist
9191
func (suite *unmountTestSuite) TestUnmountCmd() {
9292
defer suite.cleanupTest()
9393

internal/handlemap/handle_map_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (suite *HandleMapSuite) SetupTest() {
5050
suite.assert = assert.New(suite.T())
5151
}
5252

53-
// mount failure test where the mount directory does not exists
53+
// mount failure test where the mount directory does not exist
5454
func (suite *HandleMapSuite) TestNewHandle() {
5555
h := NewHandle("abc")
5656
suite.assert.NotNil(h)

test/mount_test/mount_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (suite *mountSuite) TestMountCmd() {
119119
blobfuseUnmount(suite, mntDir)
120120
}
121121

122-
// mount failure test where the mount directory does not exists
122+
// mount failure test where the mount directory does not exist
123123
func (suite *mountSuite) TestMountDirNotExists() {
124124
tempDir := filepath.Join(mntDir, "tempdir")
125125
mountCmd := exec.Command(blobfuseBinary, "mount", tempDir, "--config-file="+configFile)
@@ -129,7 +129,7 @@ func (suite *mountSuite) TestMountDirNotExists() {
129129
suite.NotEqual(nil, err)
130130
fmt.Println(errb.String())
131131
suite.NotEqual(0, len(errb.String()))
132-
suite.Contains(errb.String(), "mount directory does not exists")
132+
suite.Contains(errb.String(), "mount directory does not exist")
133133

134134
// list blobfuse mounted directories
135135
cliOut := listBlobfuseMounts(suite)

0 commit comments

Comments
 (0)