Use "pack file" instead of "data file" (#2885)
- changed variable names, especially changed DataFile into PackFile - changed in some comments - always use "pack file" in docu
This commit is contained in:
parent
643bbbe156
commit
0fed6a8dfc
45 changed files with 126 additions and 126 deletions
|
@ -17,7 +17,7 @@ func TestLayout(t *testing.T) {
|
|||
filename string
|
||||
layout string
|
||||
failureExpected bool
|
||||
datafiles map[string]bool
|
||||
packfiles map[string]bool
|
||||
}{
|
||||
{"repo-layout-default.tar.gz", "", false, map[string]bool{
|
||||
"aa464e9fd598fe4202492ee317ffa728e82fa83a1de1a61996e5bd2d6651646c": false,
|
||||
|
@ -48,9 +48,9 @@ func TestLayout(t *testing.T) {
|
|||
t.Fatalf("Open() returned nil but no error")
|
||||
}
|
||||
|
||||
datafiles := make(map[string]bool)
|
||||
err = be.List(context.TODO(), restic.DataFile, func(fi restic.FileInfo) error {
|
||||
datafiles[fi.Name] = false
|
||||
packs := make(map[string]bool)
|
||||
err = be.List(context.TODO(), restic.PackFile, func(fi restic.FileInfo) error {
|
||||
packs[fi.Name] = false
|
||||
return nil
|
||||
})
|
||||
|
||||
|
@ -58,19 +58,19 @@ func TestLayout(t *testing.T) {
|
|||
t.Fatalf("List() returned error %v", err)
|
||||
}
|
||||
|
||||
if len(datafiles) == 0 {
|
||||
t.Errorf("List() returned zero data files")
|
||||
if len(packs) == 0 {
|
||||
t.Errorf("List() returned zero pack files")
|
||||
}
|
||||
|
||||
for id := range test.datafiles {
|
||||
if _, ok := datafiles[id]; !ok {
|
||||
t.Errorf("datafile with id %v not found", id)
|
||||
for id := range test.packfiles {
|
||||
if _, ok := packs[id]; !ok {
|
||||
t.Errorf("packfile with id %v not found", id)
|
||||
}
|
||||
|
||||
datafiles[id] = true
|
||||
packs[id] = true
|
||||
}
|
||||
|
||||
for id, v := range datafiles {
|
||||
for id, v := range packs {
|
||||
if !v {
|
||||
t.Errorf("unexpected id %v found", id)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue