Merge pull request #30811 from mmorel-35/testifylint

chore: fix bool-compare issues from testifylint
pull/32077/head
George Jenkins 5 months ago committed by GitHub
commit 4bd9e90aa0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -33,6 +33,7 @@ linters:
- revive - revive
- sloglint - sloglint
- staticcheck - staticcheck
- testifylint
- thelper - thelper
- unused - unused
- usestdlibvars - usestdlibvars
@ -95,6 +96,24 @@ linters:
- helpers - helpers
- models - models
testifylint:
disable:
- empty
- encoded-compare
- equal-values
- error-is-as
- error-nil
- expected-actual
- float-compare
- go-require
- len
- nil-compare
- require-error
- suite-dont-use-pkg
- suite-extra-assert-call
# Intentionally enable all testifylint rules so new checks are adopted automatically.
enable-all: true
run: run:
timeout: 10m timeout: 10m

@ -124,8 +124,8 @@ func TestIsRoot(t *testing.T) {
is := assert.New(t) is := assert.New(t)
is.Equal(false, chrt1.IsRoot()) is.False(chrt1.IsRoot())
is.Equal(true, chrt2.IsRoot()) is.True(chrt2.IsRoot())
} }
func TestChartPath(t *testing.T) { func TestChartPath(t *testing.T) {

@ -37,7 +37,7 @@ func TestNewGetValues(t *testing.T) {
assert.NotNil(t, client) assert.NotNil(t, client)
assert.Equal(t, cfg, client.cfg) assert.Equal(t, cfg, client.cfg)
assert.Equal(t, 0, client.Version) assert.Equal(t, 0, client.Version)
assert.Equal(t, false, client.AllValues) assert.False(t, client.AllValues)
} }
func TestGetValues_Run_UserConfigOnly(t *testing.T) { func TestGetValues_Run_UserConfigOnly(t *testing.T) {

@ -47,14 +47,14 @@ func TestNewPushWithInsecureSkipTLSVerify(t *testing.T) {
client := NewPushWithOpts(WithInsecureSkipTLSVerify(true)) client := NewPushWithOpts(WithInsecureSkipTLSVerify(true))
assert.NotNil(t, client) assert.NotNil(t, client)
assert.Equal(t, true, client.insecureSkipTLSVerify) assert.True(t, client.insecureSkipTLSVerify)
} }
func TestNewPushWithPlainHTTP(t *testing.T) { func TestNewPushWithPlainHTTP(t *testing.T) {
client := NewPushWithOpts(WithPlainHTTP(true)) client := NewPushWithOpts(WithPlainHTTP(true))
assert.NotNil(t, client) assert.NotNil(t, client)
assert.Equal(t, true, client.plainHTTP) assert.True(t, client.plainHTTP)
} }
func TestNewPushWithPushOptWriter(t *testing.T) { func TestNewPushWithPushOptWriter(t *testing.T) {

@ -48,7 +48,7 @@ func TestWithInsecure(t *testing.T) {
opt := WithInsecure(true) opt := WithInsecure(true)
assert.Nil(t, opt(client)) assert.Nil(t, opt(client))
assert.Equal(t, true, client.insecure) assert.True(t, client.insecure)
} }
func TestWithKeyFile(t *testing.T) { func TestWithKeyFile(t *testing.T) {
@ -80,5 +80,5 @@ func TestWithPlainHTTPLogin(t *testing.T) {
opt := WithPlainHTTPLogin(true) opt := WithPlainHTTPLogin(true)
assert.Nil(t, opt(client)) assert.Nil(t, opt(client))
assert.Equal(t, true, client.plainHTTP) assert.True(t, client.plainHTTP)
} }

@ -124,8 +124,8 @@ func TestIsRoot(t *testing.T) {
is := assert.New(t) is := assert.New(t)
is.Equal(false, chrt1.IsRoot()) is.False(chrt1.IsRoot())
is.Equal(true, chrt2.IsRoot()) is.True(chrt2.IsRoot())
} }
func TestChartPath(t *testing.T) { func TestChartPath(t *testing.T) {

Loading…
Cancel
Save