mirror of
https://github.com/restic/restic.git
synced 2026-06-27 11:04:17 +00:00
decrease test data sizes
This commit is contained in:
@@ -754,12 +754,12 @@ func TestArchiverSaveDir(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
src: TestDir{
|
||||
"targetfile": TestFile{Content: string(rtest.Random(888, 2*1024*1024+5000))},
|
||||
"targetfile": TestFile{Content: string(rtest.Random(888, 20*1024+5000))},
|
||||
},
|
||||
target: ".",
|
||||
want: TestDir{
|
||||
"targetdir": TestDir{
|
||||
"targetfile": TestFile{Content: string(rtest.Random(888, 2*1024*1024+5000))},
|
||||
"targetfile": TestFile{Content: string(rtest.Random(888, 20*1024+5000))},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -769,8 +769,8 @@ func TestArchiverSaveDir(t *testing.T) {
|
||||
"foo": TestFile{Content: "foo"},
|
||||
"emptyfile": TestFile{Content: ""},
|
||||
"bar": TestFile{Content: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"},
|
||||
"largefile": TestFile{Content: string(rtest.Random(888, 2*1024*1024+5000))},
|
||||
"largerfile": TestFile{Content: string(rtest.Random(234, 5*1024*1024+5000))},
|
||||
"largefile": TestFile{Content: string(rtest.Random(888, 1*1024*1024+5000))},
|
||||
"largerfile": TestFile{Content: string(rtest.Random(234, 3*1024*1024+5000))},
|
||||
},
|
||||
},
|
||||
target: "targetdir",
|
||||
|
||||
Vendored
+1
-1
@@ -22,7 +22,7 @@ import (
|
||||
func generateRandomFiles(t testing.TB, random *rand.Rand, tpe backend.FileType, c *Cache) map[string]struct{} {
|
||||
ids := make(map[string]struct{})
|
||||
for i := 0; i < random.Intn(15)+10; i++ {
|
||||
buf := rtest.Random(random.Int(), 1<<19)
|
||||
buf := rtest.Random(random.Int(), 1<<15)
|
||||
id := restic.Hash(buf)
|
||||
h := backend.Handle{Type: tpe, Name: id.String()}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ func (s *Suite[C]) TestLoad(t *testing.T) {
|
||||
test.Assert(t, b.IsNotExist(err), "IsNotExist() did not recognize non-existing blob: %v", err)
|
||||
test.Assert(t, b.IsPermanentError(err), "IsPermanentError() did not recognize non-existing blob: %v", err)
|
||||
|
||||
length := random.Intn(1<<24) + 2000
|
||||
length := random.Intn(1<<20) + 2000
|
||||
|
||||
data := test.Random(23, length)
|
||||
id := restic.Hash(data)
|
||||
|
||||
Reference in New Issue
Block a user