mirror of
https://github.com/octoleo/restic.git
synced 2024-11-23 13:17:42 +00:00
restore: test timestamps for macOS resource forks are restored correctly
This commit is contained in:
parent
2e55209b34
commit
43b36ad2b0
@ -197,6 +197,20 @@ var nodeTests = []Node{
|
|||||||
{"user.foo", []byte("bar")},
|
{"user.foo", []byte("bar")},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "testXattrFileMacOSResourceFork",
|
||||||
|
Type: "file",
|
||||||
|
Content: IDs{},
|
||||||
|
UID: uint32(os.Getuid()),
|
||||||
|
GID: uint32(os.Getgid()),
|
||||||
|
Mode: 0604,
|
||||||
|
ModTime: parseTime("2005-05-14 21:07:03.111"),
|
||||||
|
AccessTime: parseTime("2005-05-14 21:07:04.222"),
|
||||||
|
ChangeTime: parseTime("2005-05-14 21:07:05.333"),
|
||||||
|
ExtendedAttributes: []ExtendedAttribute{
|
||||||
|
{"com.apple.ResourceFork", []byte("bar")},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNodeRestoreAt(t *testing.T) {
|
func TestNodeRestoreAt(t *testing.T) {
|
||||||
@ -216,6 +230,11 @@ func TestNodeRestoreAt(t *testing.T) {
|
|||||||
extAttrArr[i].Name = strings.ToUpper(extAttrArr[i].Name)
|
extAttrArr[i].Name = strings.ToUpper(extAttrArr[i].Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for _, attr := range test.ExtendedAttributes {
|
||||||
|
if strings.HasPrefix(attr.Name, "com.apple.") && runtime.GOOS != "darwin" {
|
||||||
|
t.Skipf("attr %v only relevant on macOS", attr.Name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// tempdir might be backed by a filesystem that does not support
|
// tempdir might be backed by a filesystem that does not support
|
||||||
// extended attributes
|
// extended attributes
|
||||||
|
Loading…
Reference in New Issue
Block a user