From a480ec93c01128107f9b3607a4dcc8c8ec8d2bd0 Mon Sep 17 00:00:00 2001 From: Travis Raines <571832+rainest@users.noreply.github.com> Date: Fri, 3 May 2024 15:45:39 -0700 Subject: [PATCH] chore(tests) disable sec lints --- internal/dataplane/kongstate/consumer_test.go | 4 ++-- internal/dataplane/kongstate/credentials_test.go | 4 ++-- internal/dataplane/kongstate/kongstate_test.go | 4 ++-- internal/dataplane/kongstate/plugin_test.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/dataplane/kongstate/consumer_test.go b/internal/dataplane/kongstate/consumer_test.go index 9514742e1e..94b27d74af 100644 --- a/internal/dataplane/kongstate/consumer_test.go +++ b/internal/dataplane/kongstate/consumer_test.go @@ -17,7 +17,7 @@ func int64Ptr(i int64) *int64 { func TestConsumer_SanitizedCopy(t *testing.T) { // this needs a static random seed because some auths generate random values - uuid.SetRand(rand.New(rand.NewSource(1))) + uuid.SetRand(rand.New(rand.NewSource(1))) //nolint:gosec for _, tt := range []struct { name string in Consumer @@ -68,7 +68,7 @@ func TestConsumer_SanitizedCopy(t *testing.T) { }, } { // this needs a static random seed because some auths generate random values - uuid.SetRand(rand.New(rand.NewSource(1))) + uuid.SetRand(rand.New(rand.NewSource(1))) //nolint:gosec t.Run(tt.name, func(t *testing.T) { got := *tt.in.SanitizedCopy() assert.Equal(t, tt.want, got) diff --git a/internal/dataplane/kongstate/credentials_test.go b/internal/dataplane/kongstate/credentials_test.go index a78daf3d10..86213205cf 100644 --- a/internal/dataplane/kongstate/credentials_test.go +++ b/internal/dataplane/kongstate/credentials_test.go @@ -11,7 +11,7 @@ import ( func TestKeyAuth_SanitizedCopy(t *testing.T) { // this needs a static random seed because some auths generate random values - uuid.SetRand(rand.New(rand.NewSource(1))) + uuid.SetRand(rand.New(rand.NewSource(1))) //nolint:gosec for _, tt := range []struct { name string in KeyAuth @@ -35,7 +35,7 @@ func TestKeyAuth_SanitizedCopy(t *testing.T) { }, } { // this needs a static random seed because some auths generate random values - uuid.SetRand(rand.New(rand.NewSource(1))) + uuid.SetRand(rand.New(rand.NewSource(1))) //nolint:gosec t.Run(tt.name, func(t *testing.T) { got := *tt.in.SanitizedCopy() assert.Equal(t, tt.want, got) diff --git a/internal/dataplane/kongstate/kongstate_test.go b/internal/dataplane/kongstate/kongstate_test.go index 7cff78c3b3..4fb4f1e81e 100644 --- a/internal/dataplane/kongstate/kongstate_test.go +++ b/internal/dataplane/kongstate/kongstate_test.go @@ -48,7 +48,7 @@ var serviceTypeMeta = metav1.TypeMeta{ func TestKongState_SanitizedCopy(t *testing.T) { testedFields := sets.New[string]() // this needs a static random seed because some auths generate random values - uuid.SetRand(rand.New(rand.NewSource(1))) + uuid.SetRand(rand.New(rand.NewSource(1))) //nolint:gosec for _, tt := range []struct { name string in KongState @@ -107,7 +107,7 @@ func TestKongState_SanitizedCopy(t *testing.T) { }, } { // this needs a static random seed because some auths generate random values - uuid.SetRand(rand.New(rand.NewSource(1))) + uuid.SetRand(rand.New(rand.NewSource(1))) //nolint:gosec t.Run(tt.name, func(t *testing.T) { testedFields.Insert(extractNotEmptyFieldNames(tt.in)...) got := *tt.in.SanitizedCopy() diff --git a/internal/dataplane/kongstate/plugin_test.go b/internal/dataplane/kongstate/plugin_test.go index 2c66c1ba33..5bfca27a4f 100644 --- a/internal/dataplane/kongstate/plugin_test.go +++ b/internal/dataplane/kongstate/plugin_test.go @@ -770,7 +770,7 @@ func TestKongPluginFromK8SPlugin(t *testing.T) { func TestPlugin_SanitizedCopy(t *testing.T) { // this needs a static random seed because some auths generate random values - uuid.SetRand(rand.New(rand.NewSource(1))) + uuid.SetRand(rand.New(rand.NewSource(1))) //nolint:gosec testCases := []struct { name string config kong.Configuration