Skip to content

Commit

Permalink
chore(tests) disable sec lints
Browse files Browse the repository at this point in the history
  • Loading branch information
rainest committed May 3, 2024
1 parent 36538e8 commit a480ec9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/dataplane/kongstate/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions internal/dataplane/kongstate/credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions internal/dataplane/kongstate/kongstate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion internal/dataplane/kongstate/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a480ec9

Please sign in to comment.