From 1a58d7f437d5ecacdfa2db7af2bd46d6814add85 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Fri, 28 Jun 2024 21:20:13 +0200 Subject: [PATCH] fix: enable empty and len rules from testifylint on pkg package Signed-off-by: Matthieu MOREL Co-authored-by: Patrick Ohly Kubernetes-commit: f014b754fb5925dfbca6e27a44d0c3968b157e14 --- pkg/cmd/apply/apply_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/apply/apply_test.go b/pkg/cmd/apply/apply_test.go index 383277c10..0b8dc80b6 100644 --- a/pkg/cmd/apply/apply_test.go +++ b/pkg/cmd/apply/apply_test.go @@ -3432,7 +3432,7 @@ func TestApplySetDryRun(t *testing.T) { cmd.Run(cmd, []string{}) }) assert.Equal(t, "replicationcontroller/test-rc serverside-applied (server dry run)\n", outbuff.String()) - assert.Equal(t, len(serverSideData), 1, "unexpected creation") + assert.Len(t, serverSideData, 1, "unexpected creation") require.Nil(t, serverSideData[pathSecret], "secret was created") }) @@ -3449,7 +3449,7 @@ func TestApplySetDryRun(t *testing.T) { cmd.Run(cmd, []string{}) }) assert.Equal(t, "replicationcontroller/test-rc configured (dry run)\n", outbuff.String()) - assert.Equal(t, len(serverSideData), 1, "unexpected creation") + assert.Len(t, serverSideData, 1, "unexpected creation") require.Nil(t, serverSideData[pathSecret], "secret was created") }) }