mirror of
https://github.com/helm/helm.git
synced 2026-05-23 18:36:50 -04:00
chore: fix bool-compare issues from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
parent
42f78ba60e
commit
071558d69f
6 changed files with 28 additions and 9 deletions
|
|
@ -32,6 +32,7 @@ linters:
|
|||
- revive
|
||||
- sloglint
|
||||
- staticcheck
|
||||
- testifylint
|
||||
- thelper
|
||||
- unused
|
||||
- usestdlibvars
|
||||
|
|
@ -92,6 +93,24 @@ linters:
|
|||
- helpers
|
||||
- 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:
|
||||
timeout: 10m
|
||||
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ func TestIsRoot(t *testing.T) {
|
|||
|
||||
is := assert.New(t)
|
||||
|
||||
is.Equal(false, chrt1.IsRoot())
|
||||
is.Equal(true, chrt2.IsRoot())
|
||||
is.False(chrt1.IsRoot())
|
||||
is.True(chrt2.IsRoot())
|
||||
}
|
||||
|
||||
func TestChartPath(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ func TestNewGetValues(t *testing.T) {
|
|||
assert.NotNil(t, client)
|
||||
assert.Equal(t, cfg, client.cfg)
|
||||
assert.Equal(t, 0, client.Version)
|
||||
assert.Equal(t, false, client.AllValues)
|
||||
assert.False(t, client.AllValues)
|
||||
}
|
||||
|
||||
func TestGetValues_Run_UserConfigOnly(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -47,14 +47,14 @@ func TestNewPushWithInsecureSkipTLSVerify(t *testing.T) {
|
|||
client := NewPushWithOpts(WithInsecureSkipTLSVerify(true))
|
||||
|
||||
assert.NotNil(t, client)
|
||||
assert.Equal(t, true, client.insecureSkipTLSVerify)
|
||||
assert.True(t, client.insecureSkipTLSVerify)
|
||||
}
|
||||
|
||||
func TestNewPushWithPlainHTTP(t *testing.T) {
|
||||
client := NewPushWithOpts(WithPlainHTTP(true))
|
||||
|
||||
assert.NotNil(t, client)
|
||||
assert.Equal(t, true, client.plainHTTP)
|
||||
assert.True(t, client.plainHTTP)
|
||||
}
|
||||
|
||||
func TestNewPushWithPushOptWriter(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func TestWithInsecure(t *testing.T) {
|
|||
opt := WithInsecure(true)
|
||||
|
||||
assert.Nil(t, opt(client))
|
||||
assert.Equal(t, true, client.insecure)
|
||||
assert.True(t, client.insecure)
|
||||
}
|
||||
|
||||
func TestWithKeyFile(t *testing.T) {
|
||||
|
|
@ -80,5 +80,5 @@ func TestWithPlainHTTPLogin(t *testing.T) {
|
|||
opt := WithPlainHTTPLogin(true)
|
||||
|
||||
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.Equal(false, chrt1.IsRoot())
|
||||
is.Equal(true, chrt2.IsRoot())
|
||||
is.False(chrt1.IsRoot())
|
||||
is.True(chrt2.IsRoot())
|
||||
}
|
||||
|
||||
func TestChartPath(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue