mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
server: Fix CI build complaints (#4119)
- Ineffassign fixes. - Spell check correction.
This commit is contained in:
parent
a7afa469e2
commit
5f065e2a96
@ -245,7 +245,7 @@ func TestGetValidServerConfig(t *testing.T) {
|
||||
|
||||
// Invalid config - no quorum.
|
||||
serverConfigs = []serverConfigV13{c1, c2, c2, c1}
|
||||
validConfig, err = getValidServerConfig(serverConfigs, noErrs)
|
||||
_, err = getValidServerConfig(serverConfigs, noErrs)
|
||||
if err != errXLWriteQuorum {
|
||||
t.Errorf("Expected to fail due to lack of quorum but received %v", err)
|
||||
}
|
||||
@ -253,7 +253,7 @@ func TestGetValidServerConfig(t *testing.T) {
|
||||
// All errors
|
||||
allErrs := []error{errDiskNotFound, errDiskNotFound, errDiskNotFound, errDiskNotFound}
|
||||
serverConfigs = []serverConfigV13{{}, {}, {}, {}}
|
||||
validConfig, err = getValidServerConfig(serverConfigs, allErrs)
|
||||
_, err = getValidServerConfig(serverConfigs, allErrs)
|
||||
if err != errXLWriteQuorum {
|
||||
t.Errorf("Expected to fail due to lack of quorum but received %v", err)
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ func TestNewEndpoint(t *testing.T) {
|
||||
} else if err == nil {
|
||||
t.Fatalf("error: expected = %v, got = <nil>", testCase.expectedErr)
|
||||
} else {
|
||||
match := false
|
||||
var match bool
|
||||
if strings.HasSuffix(testCase.expectedErr.Error(), errMsg) {
|
||||
match = strings.HasSuffix(err.Error(), errMsg)
|
||||
} else {
|
||||
|
@ -867,11 +867,11 @@ func testWebHandlerDownloadZip(obj ObjectLayer, instanceType string, t TestErrHa
|
||||
apiRouter.ServeHTTP(rec, req)
|
||||
return rec.Code, rec.Body.Bytes()
|
||||
}
|
||||
code, data := test("")
|
||||
code, _ := test("")
|
||||
if code != 403 {
|
||||
t.Fatal("Expected to receive authentication error")
|
||||
}
|
||||
code, data = test(authorization)
|
||||
code, data := test(authorization)
|
||||
if code != 200 {
|
||||
t.Fatal("web.DownloadsZip() failed")
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ func TestListOnlineDisks(t *testing.T) {
|
||||
partsMetadata := partsMetaFromModTimes(test.modTimes, xlMeta.Erasure.Checksum)
|
||||
|
||||
onlineDisks, modTime := listOnlineDisks(xlDisks, partsMetadata, test.errs)
|
||||
availableDisks, newErrs, err := disksWithAllParts(onlineDisks, partsMetadata, test.errs, bucket, object)
|
||||
availableDisks, newErrs, _ := disksWithAllParts(onlineDisks, partsMetadata, test.errs, bucket, object)
|
||||
test.errs = newErrs
|
||||
outdatedDisks := outDatedDisks(xlDisks, availableDisks, test.errs, partsMetadata, bucket, object)
|
||||
if modTime.Equal(timeSentinel) {
|
||||
|
Loading…
Reference in New Issue
Block a user