Commit Graph
39 Commits
Author SHA1 Message Date
Kenneth Skovhede 9a9ea55fed Made the ignore in tests a bit more explicit 2026-06-03 17:40:14 +02:00
Kenneth Skovhede 211c58cbbc Added support for supressing warnings during tests 2026-06-03 14:34:42 +02:00
Kenneth Skovhede 179d1ceb47 Make controller Async
This PR has a large blast radius because it takes the final step and bumps up the Controller to be fully async.

We have historically done a piece-by-piece update, so all operations were already async but the controller interface was kept synchronous.

With this update, the controller is now fully async and all tests are updated.

Most places where the new C# compiler warns about function names not ending in `Async` were also adressed, giving a massive refactor change.

Functionally, no changes are done.
2026-05-13 15:04:13 +02:00
Kenneth Skovhede c0f40e19ca Updated copyright year to 2026 across the project 2026-04-16 15:21:24 +02:00
Kenneth Skovhede d22ce5370e Rewrote the repair for scenarios where remote files are missing.
This adds a number of additional features to the repair process so it can actually fully recover if all data is present.

Also added a several tests to ensure that the functionality works in multiple scenarios.

This fixes #5987
2025-05-08 10:31:38 +02:00
Kenneth Skovhede 49cb6f01fb Added logging to catch CI-only failure 2025-04-16 08:05:38 +02:00
Kenneth Skovhede c673cba607 Cleanups in tests 2025-03-10 14:39:31 +01:00
Kenneth Skovhede d8f6b3370a Removed unused code 2025-02-16 16:09:20 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth SkovhedeandGitHub bfc3d61bc2 Merge branch 'master' into fix-leftover-index 2024-07-19 13:53:06 +02:00
Jojo-1000 917e2cd0c4 Remove obsolete custom platform detection. 2024-05-30 02:14:05 +02:00
Jojo-1000 0b92f19572 Merge branch 'master' into fix-leftover-index 2024-05-11 23:37:21 +02:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Jojo-1000 ea6c418b7b Add test case to reproduce part of #5023. 2023-10-08 22:25:42 +02:00
gpatel-fr befaccdab6 raise again the time shift for mac tests (3s) 2023-05-17 20:23:01 +02:00
gpatel-fr 3c6e4fb50d Raise the file time shift to 2.5s for Mac unittests 2023-05-04 13:38:39 +02:00
gpatel-fr 467313e59c Raise the file time shift to 2s for Mac unittests
because these tests are often failing.
2023-04-03 00:17:02 +02:00
Kenneth Hsu d6e9e08272 Increase tolerance for last write time tests on macOS.
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
2021-02-08 11:48:05 -08:00
Kenneth Hsu cb89d50862 Increase tolerance for last write time tests on macOS.
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
2021-02-07 20:22:23 -08:00
Kenneth Hsu 1e8752a0cd Increase tolerance for last write time tests on macOS.
There are occasionally times where the difference is greater than 100ms.
2021-02-07 13:59:34 -08:00
Kenneth Hsu 6ec037acc0 Use helper method to determine platform.
We should eventually make this method use
RuntimeInformation.IsOSPlatform.
2021-02-07 11:59:20 -08:00
Kenneth Hsu 97c33a0e13 Fix comment style. 2021-02-07 11:58:37 -08:00
Thomas SuckowandKenneth Hsu 06850697bd Relax unit test file time checking on osx 2021-02-07 11:58:02 -08:00
Dean Ferreyra eafe7320e9 Address review comments 2020-09-12 14:45:55 -07:00
Dean Ferreyra 3366071d04 Add back missing stream reset to AssertFilesAreEqual 2020-09-12 14:29:04 -07:00
Dean Ferreyra 75b688c999 Restore use of Utility.CompareStreams in AssertFilesAreEqual
For performance reasons, use `Utility.CompareStreams` in
AssertFilesAreEqual.
2020-09-12 08:08:52 -07:00
Dean Ferreyra 2c56634899 Add tolerance to file time comparisons 2020-09-11 23:25:03 -07:00
Dean Ferreyra f4195e4eb0 Address review comments from @warwickmm
Replace `VerifyDir` and `CompareFiles` with
`AssertDirectoryTreesAreEquivalent` and `AssertFilesAreEqual`.

Move `WriteFile` to `TestUtils`.

Add "Symlink" category to start.sh.
2020-09-11 20:06:53 -07:00
BlueBlock 7ce4639a9e unittest added for ReadLimitLengthStream() 2019-08-29 17:23:19 -04:00
verhoek b2cc18426c Renamed Library.IO to Library.Common.IO.
Moved basic Platform functions to Library.Common.Platform.
Turned IO_OS into property within Library.Common.
2018-11-02 21:34:07 +01:00
verhoek bc053df294 Moved basic IO helper functions to Library.IO. 2018-10-27 12:17:07 +02:00
verhoek 30cd41585b Corrected spelling function name. 2018-05-16 20:08:40 +02:00
Kenneth Skovhede 842fd96543 Implemented a new logging system that is more transparent and allows a more granular way of picking log messages.
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
2018-03-15 09:12:34 +01:00
Kenneth Skovhede 8b448408b3 Cleaned up the border-tests and added a check for restore.
The mixed-hash tests fail the restore for files smaller than blocksize, so they are commented out, but should be fixed soon.
2016-04-02 21:54:46 +02:00
Kenneth Skovhede 20a1d4855f More bugfixes for Travis unittest 2016-01-26 22:48:59 +01:00
Kenneth Skovhede 60bd9693d0 Imporved handling of the ~ character in paths 2015-09-05 09:14:21 +02:00
Kenneth Skovhede 6dac0f3c2e Fixed an invalid line-ending character 2015-08-05 13:51:56 +02:00
Kenneth Skovhede e65e7d234e Fixed an issue where a restored database was missing some files.
This fixes #1410.
2015-07-12 21:36:48 +02:00
Kenneth Skovhede b01af6e057 Implemented more unittests 2015-04-10 22:29:52 +02:00