mirror of
https://github.com/restic/restic.git
synced 2025-11-15 01:42:56 +00:00
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:
@@ -25,7 +25,7 @@ func TestDefaultLayout(t *testing.T) {
|
||||
{
|
||||
tempdir,
|
||||
filepath.Join,
|
||||
restic.Handle{Type: restic.DataFile, Name: "0123456"},
|
||||
restic.Handle{Type: restic.PackFile, Name: "0123456"},
|
||||
filepath.Join(tempdir, "data", "01", "0123456"),
|
||||
},
|
||||
{
|
||||
@@ -61,7 +61,7 @@ func TestDefaultLayout(t *testing.T) {
|
||||
{
|
||||
"",
|
||||
path.Join,
|
||||
restic.Handle{Type: restic.DataFile, Name: "0123456"},
|
||||
restic.Handle{Type: restic.PackFile, Name: "0123456"},
|
||||
"data/01/0123456",
|
||||
},
|
||||
{
|
||||
@@ -148,7 +148,7 @@ func TestRESTLayout(t *testing.T) {
|
||||
filename string
|
||||
}{
|
||||
{
|
||||
restic.Handle{Type: restic.DataFile, Name: "0123456"},
|
||||
restic.Handle{Type: restic.PackFile, Name: "0123456"},
|
||||
filepath.Join(path, "data", "0123456"),
|
||||
},
|
||||
{
|
||||
@@ -216,7 +216,7 @@ func TestRESTLayoutURLs(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
&RESTLayout{URL: "https://hostname.foo", Path: "", Join: path.Join},
|
||||
restic.Handle{Type: restic.DataFile, Name: "foobar"},
|
||||
restic.Handle{Type: restic.PackFile, Name: "foobar"},
|
||||
"https://hostname.foo/data/foobar",
|
||||
"https://hostname.foo/data/",
|
||||
},
|
||||
@@ -234,7 +234,7 @@ func TestRESTLayoutURLs(t *testing.T) {
|
||||
},
|
||||
{
|
||||
&S3LegacyLayout{URL: "https://hostname.foo", Path: "/", Join: path.Join},
|
||||
restic.Handle{Type: restic.DataFile, Name: "foobar"},
|
||||
restic.Handle{Type: restic.PackFile, Name: "foobar"},
|
||||
"https://hostname.foo/data/foobar",
|
||||
"https://hostname.foo/data/",
|
||||
},
|
||||
@@ -252,7 +252,7 @@ func TestRESTLayoutURLs(t *testing.T) {
|
||||
},
|
||||
{
|
||||
&S3LegacyLayout{URL: "", Path: "", Join: path.Join},
|
||||
restic.Handle{Type: restic.DataFile, Name: "foobar"},
|
||||
restic.Handle{Type: restic.PackFile, Name: "foobar"},
|
||||
"data/foobar",
|
||||
"data/",
|
||||
},
|
||||
@@ -294,7 +294,7 @@ func TestS3LegacyLayout(t *testing.T) {
|
||||
filename string
|
||||
}{
|
||||
{
|
||||
restic.Handle{Type: restic.DataFile, Name: "0123456"},
|
||||
restic.Handle{Type: restic.PackFile, Name: "0123456"},
|
||||
filepath.Join(path, "data", "0123456"),
|
||||
},
|
||||
{
|
||||
@@ -419,8 +419,8 @@ func TestParseLayout(t *testing.T) {
|
||||
}
|
||||
|
||||
// test that the functions work (and don't panic)
|
||||
_ = layout.Dirname(restic.Handle{Type: restic.DataFile})
|
||||
_ = layout.Filename(restic.Handle{Type: restic.DataFile, Name: "1234"})
|
||||
_ = layout.Dirname(restic.Handle{Type: restic.PackFile})
|
||||
_ = layout.Filename(restic.Handle{Type: restic.PackFile, Name: "1234"})
|
||||
_ = layout.Paths()
|
||||
|
||||
layoutName := fmt.Sprintf("%T", layout)
|
||||
|
||||
Reference in New Issue
Block a user