Skip to content

Commit 7bfdda4

Browse files
authored
Merge pull request kubernetes#129380 from jdtuhui/testifylint/len@component-base
fix: enable len rule from testifylint in module component-base
2 parents 35f5841 + f47e6d0 commit 7bfdda4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

staging/src/k8s.io/component-base/logs/json/json_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func TestZapLoggerInfo(t *testing.T) {
9898

9999
logStrLines := strings.Split(logStr, "\n")
100100
dataFormatLines := strings.Split(data.format, "\n")
101-
if !assert.Equal(t, len(logStrLines), len(dataFormatLines)) {
101+
if !assert.Len(t, logStrLines, len(dataFormatLines)) {
102102
t.Errorf("Info has wrong format: no. of lines in log is incorrect \n expect:%d\n got:%d", len(dataFormatLines), len(logStrLines))
103103
}
104104

0 commit comments

Comments
 (0)