mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
tests: Do not allow forced type asserts (#20905)
This commit is contained in:
@@ -127,7 +127,6 @@ func (m *Monitor) getReport(selectBucket SelectionFunction) *BucketBandwidthRepo
|
||||
}
|
||||
}
|
||||
m.tlock.RUnlock()
|
||||
|
||||
}
|
||||
return report
|
||||
}
|
||||
|
||||
@@ -64,7 +64,6 @@ func (r *MonitoredReader) Read(buf []byte) (n int, err error) {
|
||||
r.opts.HeaderSize = 0
|
||||
need = int(math.Min(float64(b-hdr), float64(need))) // use remaining tokens towards payload
|
||||
tokens = need + hdr
|
||||
|
||||
} else { // part of header can be accommodated
|
||||
r.opts.HeaderSize -= b - 1
|
||||
need = 1 // to ensure we read at least one byte for every Read
|
||||
|
||||
@@ -207,7 +207,6 @@ func (lc Lifecycle) HasActiveRules(prefix string) bool {
|
||||
if !rule.Transition.IsNull() { // this allows for Transition.Days to be zero.
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -365,7 +365,6 @@ func TestHasActiveRules(t *testing.T) {
|
||||
t.Fatalf("Expected result with recursive set to true: `%v`, got: `%v`", tc.expectedRec, got)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,5 @@ func TestMetadataReplicate(t *testing.T) {
|
||||
t.Fatalf("Expected result with recursive set to false: `%v`, got: `%v`", tc.expectedResult, got)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user