Skip to content

Commit

Permalink
Fixed the random generator lint on test
Browse files Browse the repository at this point in the history
  • Loading branch information
dianadevasia committed Mar 11, 2024
1 parent 50c291a commit 9de4395
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions toxics/limit_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

func buffer(size int) []byte {
buf := make([]byte, size)
// #nosec G404 -- used only in tests
rand.Read(buf)

return buf
Expand Down
1 change: 1 addition & 0 deletions toxics/toxic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ func TestToxicStub_WriteOutput(t *testing.T) {
stub := toxics.NewToxicStub(input, output)

buf := make([]byte, 42)
// #nosec G404 -- used only in tests
rand.Read(buf)

t.Run("when no read in 1 second", func(t *testing.T) {
Expand Down

0 comments on commit 9de4395

Please sign in to comment.