diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2019-08-06 23:46:02 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2019-09-18 12:57:35 +0200 |
commit | 42154921204c07a7321a31db2da5c111188bb4f4 (patch) | |
tree | c8360b99bcdf2abae2506927b2bf1ec4094bfea0 /pkg/ioutils | |
parent | 27916165b6172a386a8ad27ff61f962609b32b84 (diff) | |
download | docker-42154921204c07a7321a31db2da5c111188bb4f4.tar.gz |
pkg/ioutils use sha256 instead of sha1 in tests
Not really important as it's just test-code, but prevents
gosec linting from producing warnings
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'pkg/ioutils')
-rw-r--r-- | pkg/ioutils/bytespipe_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/ioutils/bytespipe_test.go b/pkg/ioutils/bytespipe_test.go index 9101f20a21..5e36187482 100644 --- a/pkg/ioutils/bytespipe_test.go +++ b/pkg/ioutils/bytespipe_test.go @@ -1,7 +1,7 @@ package ioutils // import "github.com/docker/docker/pkg/ioutils" import ( - "crypto/sha1" + "crypto/sha256" "encoding/hex" "math/rand" "testing" @@ -77,7 +77,7 @@ func TestBytesPipeWriteRandomChunks(t *testing.T) { for _, c := range cases { // first pass: write directly to hash - hash := sha1.New() + hash := sha256.New() for i := 0; i < c.iterations*c.writesPerLoop; i++ { if _, err := hash.Write(testMessage[:writeChunks[i%len(writeChunks)]]); err != nil { t.Fatal(err) |