mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
ci: re-enable revive and gosec linters (#17225)
* Reenables revive linter for test files (with an exception for the `unused-parameter` rule) * Reenables gosec linter for test files
This commit is contained in:
@@ -121,7 +121,7 @@ func TestLimitWriter(t *testing.T) {
|
||||
n, err := cryptorand.Read(data)
|
||||
require.NoError(t, err, "crand read")
|
||||
require.Equal(t, wc.N, n, "correct bytes read")
|
||||
max := data[:wc.ExpN]
|
||||
maxSeen := data[:wc.ExpN]
|
||||
n, err = w.Write(data)
|
||||
if wc.Err {
|
||||
require.Error(t, err, "exp error")
|
||||
@@ -131,7 +131,7 @@ func TestLimitWriter(t *testing.T) {
|
||||
|
||||
// Need to use this to compare across multiple writes.
|
||||
// Each write appends to the expected output.
|
||||
allBuff.Write(max)
|
||||
allBuff.Write(maxSeen)
|
||||
|
||||
require.Equal(t, wc.ExpN, n, "correct bytes written")
|
||||
require.Equal(t, allBuff.Bytes(), buf.Bytes(), "expected data")
|
||||
|
||||
Reference in New Issue
Block a user