mirror of
https://github.com/containers/skopeo.git
synced 2025-09-05 08:41:00 +00:00
fix(deps): update module github.com/containers/storage to v1.57.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
15
vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.go
generated
vendored
15
vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.go
generated
vendored
@@ -26,12 +26,13 @@ import (
|
||||
"archive/tar"
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"crypto/rand"
|
||||
"crypto/sha256"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
"math/big"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
@@ -45,10 +46,6 @@ import (
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
)
|
||||
|
||||
func init() {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
}
|
||||
|
||||
// TestingController is Compression with some helper methods necessary for testing.
|
||||
type TestingController interface {
|
||||
Compression
|
||||
@@ -920,9 +917,11 @@ func checkVerifyInvalidTOCEntryFail(filename string) check {
|
||||
}
|
||||
if sampleEntry == nil {
|
||||
t.Fatalf("TOC must contain at least one regfile or chunk entry other than the rewrite target")
|
||||
return
|
||||
}
|
||||
if targetEntry == nil {
|
||||
t.Fatalf("rewrite target not found")
|
||||
return
|
||||
}
|
||||
targetEntry.Offset = sampleEntry.Offset
|
||||
},
|
||||
@@ -2291,7 +2290,11 @@ var runes = []rune("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX
|
||||
func randomContents(n int) string {
|
||||
b := make([]rune, n)
|
||||
for i := range b {
|
||||
b[i] = runes[rand.Intn(len(runes))]
|
||||
bi, err := rand.Int(rand.Reader, big.NewInt(int64(len(runes))))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
b[i] = runes[int(bi.Int64())]
|
||||
}
|
||||
return string(b)
|
||||
}
|
||||
|
Reference in New Issue
Block a user