Skip to content

Commit 2541704

Browse files
authored
Fix error message typo in mounts.go (#3552)
* Fix error message typo in mounts.go * update associated tests
1 parent a30518e commit 2541704

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

storage/mounts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func getOrCreateMountingCluster(clustersAPI clusters.ClustersAPI) (string, error
165165
if apierr.IsMissing(err) {
166166
err = errors.New(err.Error())
167167
}
168-
return "", fmt.Errorf("failed to get mouting cluster: %w", err)
168+
return "", fmt.Errorf("failed to get mounting cluster: %w", err)
169169
}
170170
return cluster.ClusterID, nil
171171
}

storage/mounts_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,11 @@ func TestGetMountingClusterID_Failures(t *testing.T) {
309309
}, func(ctx context.Context, client *common.DatabricksClient) {
310310
// no mounting cluster given, try creating it
311311
_, err := getMountingClusterID(ctx, client, "")
312-
assert.EqualError(t, err, "failed to get mouting cluster: nope")
312+
assert.EqualError(t, err, "failed to get mounting cluster: nope")
313313

314314
// mounting cluster given, but it's removed already
315315
_, err = getMountingClusterID(ctx, client, "bcd")
316-
assert.EqualError(t, err, "failed to get mouting cluster: nope")
316+
assert.EqualError(t, err, "failed to get mounting cluster: nope")
317317

318318
// some other error happens
319319
_, err = getMountingClusterID(ctx, client, "def")
@@ -342,14 +342,14 @@ func TestMountCRD(t *testing.T) {
342342
})
343343
diags := r.CreateContext(ctx, d, client)
344344
assert.True(t, diags.HasError())
345-
assert.Equal(t, "failed to get mouting cluster: nope", diags[0].Summary)
345+
assert.Equal(t, "failed to get mounting cluster: nope", diags[0].Summary)
346346

347347
diags = r.ReadContext(ctx, d, client)
348348
assert.True(t, diags.HasError())
349-
assert.Equal(t, "failed to get mouting cluster: nope", diags[0].Summary)
349+
assert.Equal(t, "failed to get mounting cluster: nope", diags[0].Summary)
350350

351351
diags = r.DeleteContext(ctx, d, client)
352352
assert.True(t, diags.HasError())
353-
assert.Equal(t, "failed to get mouting cluster: nope", diags[0].Summary)
353+
assert.Equal(t, "failed to get mounting cluster: nope", diags[0].Summary)
354354
})
355355
}

0 commit comments

Comments
 (0)