Skip to content

Commit aa12acc

Browse files
Fix govet warnings
Signed-off-by: Richard Wall <[email protected]>
1 parent a53aee2 commit aa12acc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/agent/config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ func Test_ValidateAndCombineConfig_VenafiConnection(t *testing.T) {
704704
t.Setenv("KUBECONFIG", testutil.WithKubeconfig(t, cfg))
705705
srv, cert, setVenafiCloudAssert := testutil.FakeVenafiCloud(t)
706706
for _, obj := range testutil.Parse(
707-
testutil.VenConnRBAC + testutil.Undent(fmt.Sprintf(`
707+
testutil.VenConnRBAC + testutil.Undent(`
708708
---
709709
apiVersion: jetstack.io/v1alpha1
710710
kind: VenafiConnection
@@ -751,7 +751,7 @@ func Test_ValidateAndCombineConfig_VenafiConnection(t *testing.T) {
751751
- kind: ServiceAccount
752752
name: venafi-connection
753753
namespace: venafi
754-
`))) {
754+
`)) {
755755
require.NoError(t, kcl.Create(t.Context(), obj))
756756
}
757757

pkg/logs/logs_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,10 @@ retrying in %v after error: %s
385385
datagatherer informer for %q has failed and is backing off due to error: %s
386386
this is a happy log that should show as INFO`, "\n")
387387
expect := strings.TrimPrefix(`
388-
level=ERROR msg="failed to complete initial sync of %!q(MISSING) data gatherer %!q(MISSING): %!v(MISSING)" source=agent
388+
level=ERROR msg="failed to complete initial sync of %q data gatherer %q: %v" source=agent
389389
level=ERROR msg="error messages will not show in the pod's events because the POD_NAME environment variable is empty" source=agent
390-
level=ERROR msg="retrying in %!v(MISSING) after error: %!s(MISSING)" source=agent
391-
level=ERROR msg="datagatherer informer for %!q(MISSING) has failed and is backing off due to error: %!s(MISSING)" source=agent
390+
level=ERROR msg="retrying in %v after error: %s" source=agent
391+
level=ERROR msg="datagatherer informer for %q has failed and is backing off due to error: %s" source=agent
392392
level=INFO msg="this is a happy log that should show as INFO" source=agent
393393
`, "\n")
394394

@@ -409,7 +409,7 @@ level=INFO msg="this is a happy log that should show as INFO" source=agent
409409

410410
for _, line := range strings.Split(given, "\n") {
411411
// Simulate the current agent's logs.
412-
logger.Printf(line) // nolint:staticcheck
412+
logger.Print(line)
413413
}
414414

415415
assert.Equal(t, expect, gotBuf.String())

0 commit comments

Comments
 (0)