Since the repair introduces artifical filelists, there is sometimes a race in CI where the purge is faster than a second causing the time sequences to not line up during testing.
There are occasionally times where the difference is greater than 500ms.
1) Failed : Duplicati.UnitTest.BorderTests.Run100k
Restore, creation time mismatch for /Users/runner/duplicati_testdata/backup-data/c-m2 and /Users/runner/duplicati_testdata/restored/c-m2
Expected: 2021-02-08 18:39:04.9202665 +/- 00:00:00.5000000
But was: 2021-02-08 18:39:05.572262
at Duplicati.UnitTest.TestUtils.AssertFilesAreEqual (System.String
expectedFile, System.String actualFile, System.Boolean verifymetadata,
System.String contextMessage) [0x0016f] in
/Users/runner/work/duplicati/duplicati/Duplicati/UnitTest/TestUtils.cs:256
There are occasionally times where the difference is greater than 200ms.
1) Failed : Duplicati.UnitTest.BorderTests.Run100k
Restore, creation time mismatch for /Users/runner/duplicati_testdata/backup-data/b-p500 and /Users/runner/duplicati_testdata/restored/b-p500
Expected: 2021-02-08 00:34:08.0221856 +/- 00:00:00.2500000
But was: 2021-02-08 00:34:08.296859
at Duplicati.UnitTest.TestUtils.AssertFilesAreEqual (System.String
expectedFile, System.String actualFile, System.Boolean verifymetadata,
System.String contextMessage) [0x0016f] in
/Users/runner/work/duplicati/duplicati/Duplicati/UnitTest/TestUtils.cs:256
This is an attempt to avoid errors like "System.Exception : The previous
backup has time 9/27/2020 5:25:56 PM, but this backup has time 9/27/2020
5:25:55 PM. Something is wrong with the clock." We are seeing these
errors often recently in AppVeyor.
Replace `VerifyDir` and `CompareFiles` with
`AssertDirectoryTreesAreEquivalent` and `AssertFilesAreEqual`.
Move `WriteFile` to `TestUtils`.
Add "Symlink" category to start.sh.
This adds a basic symlink policy test that performs backups using each
symlink policy.
If you don't have the required privilege in Windows, you can get an
exception trying to create a symbolic link. If an exception is thrown
trying to create a symbolic link, the exception is trapped and the
test is marked as "Ignored"; e.g.,
```
1) Ignored : Duplicati.UnitTest.SymLinkTests.SymLinkPolicy
Client could not create a symbolic link. Error reported: (1314) A required privilege is not held by the client. | Read: [C:\td\backup-data\target] | Write: [C:\td\backup-data\symlink]
```