Remove use of crypto rand in tests

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan 2018-07-12 15:16:08 -07:00
parent cce0a46c8a
commit 1c6929cbd4
No known key found for this signature in database
GPG Key ID: F58C5D0A4405ACDB
2 changed files with 4 additions and 5 deletions

View File

@ -18,8 +18,8 @@ package compression
import (
"bytes"
"crypto/rand"
"io/ioutil"
"math/rand"
"testing"
)

View File

@ -20,12 +20,11 @@ import (
"bufio"
"bytes"
"context"
"crypto/rand"
_ "crypto/sha256" // required for digest package
"fmt"
"io"
"io/ioutil"
mrand "math/rand"
"math/rand"
"os"
"path/filepath"
"reflect"
@ -266,9 +265,9 @@ func generateBlobs(t checker, nblobs, maxsize int64) map[digest.Digest][]byte {
blobs := map[digest.Digest][]byte{}
for i := int64(0); i < nblobs; i++ {
p := make([]byte, mrand.Int63n(maxsize))
p := make([]byte, rand.Int63n(maxsize))
if _, err := mrand.Read(p); err != nil {
if _, err := rand.Read(p); err != nil {
t.Fatal(err)
}