Commit Graph
370 Commits
Author SHA1 Message Date
Kenneth SkovhedeandGitHub ffacd37e44 Merge branch 'master' into fix-ipv6-uri 2024-03-04 13:41:10 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Jojo-1000 a45ce610df Fix URI parsing for IPv6 addresses and add tests.
Closes #5057
2023-11-10 13:53:10 +01:00
Janandgpatel-fr 71eb03130a Improve result reporting for interrupted/failed backups (Fix #4829)
Direct import of PR#4978
Update web UI for new result reports.
For operations with fatal errors, write logs to same operation ID.
Test that Interrupted flag is correct in RunScriptTests.
Update backup log display for new result reporting.
Hide file statistics for fatal errors and change fatal icon.
2023-09-21 20:01:17 +02:00
gpatel-fr befaccdab6 raise again the time shift for mac tests (3s) 2023-05-17 20:23:01 +02:00
gpatel-fr 7e7aadc10f try to work around problems in downloading test files by retrying
set maximum output for the Linux and Mac tests
2023-05-15 00:29:47 +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
gpatel-fr cf17f488d1 update Newtonsoft lib to 13.02 2023-03-24 23:17:11 +01:00
Muhammad Abrar 86e9aed31b Some more changes 2022-06-13 12:49:47 +05:00
Muhammad Abrar f73bc2213c Added support for new backend IDrivee2(https://www.idrivee2.com) 2022-06-13 10:38:42 +05:00
Riccardo Paolo Bestetti 528478fda4 Implement exponential backoff for backend errors 2022-01-20 23:22:08 +01:00
Dean Ferreyra c50223eafe Renames relating to the extended device path prefix, \\?\ 2021-11-12 07:29:43 -08:00
Dean Ferreyra 44673ef759 Changes to IOTests per review, plus other improvements
Add path to assertion messages to pinpoint test case on failures.
2021-11-10 20:33:17 -08:00
Dean Ferreyra 158614d59a Refactor \\?\ prefix tests, rename source files, plus other review issues 2021-11-09 22:50:41 -08:00
Dean Ferreyra 423921d1c2 Revert "Change Duplicati.UnitTest project to get System.Net.Http from NuGet"
This reverts commit 2f5bb306bd.

This was an experiment that was accidentally committed.
2021-11-08 20:19:22 -08:00
Dean Ferreyra 459d1f27f6 Formalize inclusion of code from https://github.com/dotnet
Fix SystemIOWindows.PathGetFullPath per review comments.

Add unit tests for SystemIOWindows.PathGetFullPath and SystemIOWindows.PrefixWithUNC.  Also, fix a bug in the SystemIOWindows.PrefixWithUNC change that was exposed by these new unit tests.

In BackendToolTests, remove unused [Setup] and [TearDown] methods.
2021-11-08 07:42:07 -08:00
Dean Ferreyra 2f5bb306bd Change Duplicati.UnitTest project to get System.Net.Http from NuGet 2021-11-06 23:20:04 -07:00
Dean Ferreyra 0e8280f6f3 Fix SystemIOWindows handling of relative paths
The handling of relative paths in SystemIOWindows was broken by changes for #4256.

Change SystemIOWindows.PrefixWithUNC to only prefix paths with `\\?\` when they can be prefixed; i.e., only prefix paths that are fully qualified and that don't contain relative path components like `.` or `..`.  This way, relative paths passed to SystemIOWindows methods work correctly again.  Also support network paths specified using forward slashes; e.g., `//example.com/share/foo.txt`.

Simplify SystemIOWindows.GetFullPath since Path.GetFullPath will honor `\\?\` prefixes and can replace forward slashes with backslashes, etc.

Copy and adapt source for Path.IsPathFullyQualified from https://github.com/dotnet/runtime, which is MIT licensed.

Add unit test for Duplicati.CommandLine.BackendTool to validate the fix.

This fixes #4632.
2021-11-06 17:14:18 -07:00
Kenneth SkovhedeandGitHub 976173fd49 Merge pull request #4512 from warwickmm/make_filters_match_newline
Make dot in filter regex match newline characters
2021-08-11 10:30:59 +02:00
marodev e87688d9d3 Fix ReSharper's "Use string interpolation expression" / Code Smell 2021-05-15 17:02:57 +02:00
Kenneth Hsu a58f6b5d69 Add test for restoring file with newline character in name.
This concerns #4508.
2021-05-14 18:36:28 -07:00
Kenneth Hsu 4cc7beea2c Add test for restoring directory containing problematic filenames. 2021-05-14 18:34:52 -07:00
Kenneth Hsu 53621c984d Simplify verification of restored file in test. 2021-05-14 18:34:52 -07:00
warwickmmandGitHub 50ed059e11 Merge pull request #4469 from tygill/fix/ms-graph-throttling
Fix OneDrive throttling and respect retry-after header.
2021-05-04 09:42:52 -07:00
warwickmmandGitHub da2e51a80b Merge pull request #4431 from warwickmm/add_workflow_for_tests
Add GitHub workflow to run tests
2021-05-03 11:47:18 -07:00
Tyler Gill 70583f5d93 Add a bit more test coverage. 2021-03-20 12:29:57 -06:00
Tyler Gill 719adbf1f1 Clean up a few more bugs and inconsistencies in ReadLimitLengthStream. 2021-03-19 13:59:09 -06:00
Tyler Gill 7f1b6bc7a2 Fix some bugs in ReadLimitLengthStream changes, and add a unit test for some of the new behavior.
Also make NonSeekableStream block seeks via the Position setter.
2021-03-18 12:24:11 -06:00
Kenneth Skovhede 88a1ec59c3 Added delay to purge-broken-files unittest.
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.
2021-03-08 11:53:13 +01:00
Kenneth SkovhedeandGitHub 5498f16f7a Merge pull request #4414 from warwickmm/test/run_script_after
Add test for run-script-after option
2021-03-06 15:00:38 +01:00
Kenneth SkovhedeandGitHub 90a8c34c06 Merge pull request #4398 from warwickmm/bugfix/repair_missing_blocklists
Fix bug in repairing multiple missing blocklist hashes
2021-03-06 14:23:20 +01:00
Kenneth SkovhedeandGitHub 713b0b0746 Merge pull request #4417 from warwickmm/handle_unsupported_run_script_exit_codes
Abort with error if run-script-before script returns unsupported code
2021-03-06 14:12:33 +01: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
Kenneth Hsu 64410b4284 Dispose HttpWebResponse after use.
This seems to help avoid "System.Net.WebException : The operation has
timed out." issues when downloading test data.
2021-02-07 11:12:39 -08:00
Kenneth Hsu c47ab50892 Revert "Test deliberate test failure."
This reverts commit aca2f18634.
2021-02-06 18:38:48 -08:00
Kenneth Hsu aca2f18634 Test deliberate test failure. 2021-02-06 11:51:30 -08:00
Kenneth Hsu 11bd54d160 Fix test for DUPLICATI__PARSED_RESULT on Windows. 2021-01-14 20:21:47 -08:00
Kenneth Hsu 148788a879 Add test for DUPLICATI__PARSED_RESULT environment variable.
This concerns issue #4222.
2021-01-14 19:39:03 -08:00
Kenneth Hsu c11f7c2e47 Avoid testing scripts with exit code -1.
The behavior is not consistent or well-defined across shells.

https://unix.stackexchange.com/questions/418784/what-is-the-min-and-max-values-of-exit-codes-in-linux
2021-01-10 15:53:51 -08:00
Kenneth Hsu 359ae2c85b Add test for unsupported script exit codes. 2021-01-10 10:44:58 -08:00
Kenneth Hsu c377e33e3d Remove spaces around redirection operator.
This was failing in AppVeyor with the message:

Expected string length 5 but was 6. Strings differ at index 5.
Expected: "Hello"
But was:  "Hello "
2021-01-09 12:26:20 -08:00
Kenneth Hsu 232544e5a3 Remove quotes from echo statement in run-script-after test.
The behavior appears to be different between Windows and Linux.
2021-01-09 12:00:01 -08:00
Kenneth Hsu 80028005c1 Add test for run-script-after. 2021-01-09 11:14:31 -08:00
Kenneth Hsu d4b349bb99 Add test for repairing multiple missing blocklist hashes.
This concerns issue #4397.
2020-12-26 21:43:43 -08:00