Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: typos in error messages #63

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions driver/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ var (
errFsTypeEmpty = errors.New("filesystem type is empty")
errDevicePathIsNotDevice = errors.New("device path does not point on a block device")

errVolumeCapabilitiesIsNil = errors.New("volume capabilites is nil")
errVolumeCapabilitiesIsNil = errors.New("volume capabilities is nil")
errVolumeCapabilityIsNil = errors.New("volume capability is nil")
errBothMountBlockVolumes = errors.New("both mount and block volume type specified")
errAccessModeNotSupported = errors.New("access mode not supported")

errLimitBytesLessThanRequiredBytes = errors.New("limit size is less than required size")
errRequiredBytesLessThanMinimun = errors.New("required size is less than the minimun size")
errLimitBytesLessThanMinimum = errors.New("limit size is less than the minimun size")
errRequiredBytesGreaterThanMaximun = errors.New("required size is greater than the maximum size")
errRequiredBytesLessThanMinimum = errors.New("required size is less than the minimum size")
errLimitBytesLessThanMinimum = errors.New("limit size is less than the minimum size")
errRequiredBytesGreaterThanMaximum = errors.New("required size is greater than the maximum size")
errLimitBytesGreaterThanMaximum = errors.New("limit size is greater than the maximum size")
)
4 changes: 2 additions & 2 deletions driver/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ func getVolumeRequestCapacity(minSize int64, maxSize int64, capacityRange *csi.C
}

if requiredBytesSet && !limitBytesSet && requiredBytes < minSize {
return 0, errRequiredBytesLessThanMinimun
return 0, errRequiredBytesLessThanMinimum
}

if limitBytesSet && limitBytes < minSize {
return 0, errLimitBytesLessThanMinimum
}

if requiredBytesSet && requiredBytes > maxSize {
return 0, errRequiredBytesGreaterThanMaximun
return 0, errRequiredBytesGreaterThanMaximum
}

if !requiredBytesSet && limitBytesSet && limitBytes > maxSize {
Expand Down
4 changes: 2 additions & 2 deletions driver/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ func Test_getVolumeRequestCapacity(t *testing.T) {
LimitBytes: 0,
},
res: 0,
err: errRequiredBytesLessThanMinimun,
err: errRequiredBytesLessThanMinimum,
},
{
capRange: &csi.CapacityRange{
Expand Down Expand Up @@ -615,7 +615,7 @@ func Test_getVolumeRequestCapacity(t *testing.T) {
LimitBytes: 0,
},
res: 0,
err: errRequiredBytesGreaterThanMaximun,
err: errRequiredBytesGreaterThanMaximum,
},
{
capRange: &csi.CapacityRange{
Expand Down
Loading