mirror of
https://github.com/restic/restic.git
synced 2024-12-24 16:54:00 +00:00
Ignore username difference in TestMetadataChanged.
In some (rare) cases "fake" UID 51234 may exist in a system running a test. When this is the case, `cmp.Equal(want, node3)` will fail based on difference between empty string and an actual username present in a system. Fixes github issue #2372
This commit is contained in:
parent
604b18aa74
commit
db20c0b8d0
1 changed files with 4 additions and 0 deletions
|
@ -2085,6 +2085,10 @@ func TestMetadataChanged(t *testing.T) {
|
|||
|
||||
// make another snapshot
|
||||
snapshotID, node3 := snapshot(t, repo, fs, snapshotID, "testfile")
|
||||
// Override username and group to empty string - in case underlying system has user with UID 51234
|
||||
// See https://github.com/restic/restic/issues/2372
|
||||
node3.User = ""
|
||||
node3.Group = ""
|
||||
|
||||
// make sure that metadata was recorded successfully
|
||||
if !cmp.Equal(want, node3) {
|
||||
|
|
Loading…
Reference in a new issue