Remove use of crypto rand in tests
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
parent
cce0a46c8a
commit
1c6929cbd4
@ -18,8 +18,8 @@ package compression
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"crypto/rand"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"math/rand"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -20,12 +20,11 @@ import (
|
|||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"crypto/rand"
|
|
||||||
_ "crypto/sha256" // required for digest package
|
_ "crypto/sha256" // required for digest package
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
mrand "math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
@ -266,9 +265,9 @@ func generateBlobs(t checker, nblobs, maxsize int64) map[digest.Digest][]byte {
|
|||||||
blobs := map[digest.Digest][]byte{}
|
blobs := map[digest.Digest][]byte{}
|
||||||
|
|
||||||
for i := int64(0); i < nblobs; i++ {
|
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)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user