archiver: Use untyped constants for testing FileInfo

This commit is contained in:
Alexander Neumann
2019-05-05 14:57:38 +02:00
parent b016dc2ff0
commit 920d458a4a
3 changed files with 17 additions and 9 deletions

View File

@@ -17,11 +17,11 @@ func (fi wrappedFileInfo) Mode() os.FileMode {
}
// wrapFileInfo returns a new os.FileInfo with the mode, owner, and group fields changed.
func wrapFileInfo(t testing.TB, fi os.FileInfo, mode os.FileMode, uid, gid uint) os.FileInfo {
func wrapFileInfo(t testing.TB, fi os.FileInfo) os.FileInfo {
// wrap the os.FileInfo and return the modified mode, uid and gid are ignored on Windows
res := wrappedFileInfo{
FileInfo: fi,
mode: mode,
mode: mockFileInfoMode,
}
return res