Thomas Suckow
acea2fe10f
upstream
...
Update Telegram SharpAESCrypt dep
Update SystemIOWindows to split the difference
# Conflicts:
# BuildTools/AutoUpdateBuilder/AutoUpdateBuilder.csproj
# BuildTools/AutoUpdateBuilder/packages.config
# BuildTools/DependencyFinder/DependencyFinder.csproj
# BuildTools/DependencyFinder/packages.config
# BuildTools/GnupgSigningTool/GnupgSigningTool.csproj
# BuildTools/UpdateVersionStamp/UpdateVersionStamp.csproj
# BuildTools/UpdateVersionStamp/app.config
# Duplicati/CommandLine/BackendTester/Duplicati.CommandLine.BackendTester.csproj
# Duplicati/CommandLine/BackendTester/app.config
# Duplicati/CommandLine/BackendTool/Duplicati.CommandLine.BackendTool.csproj
# Duplicati/CommandLine/BackendTool/app.config
# Duplicati/CommandLine/ConfigurationImporter/Duplicati.CommandLine.ConfigurationImporter.csproj
# Duplicati/CommandLine/Duplicati.CommandLine.csproj
# Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj
# Duplicati/CommandLine/RecoveryTool/packages.config
# Duplicati/CommandLine/app.config
# Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj
# Duplicati/GUI/Duplicati.GUI.TrayIcon/app.config
# Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config
# Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj
# Duplicati/Library/AutoUpdater/app.config
# Duplicati/Library/AutoUpdater/packages.config
# Duplicati/Library/Backend/AlternativeFTP/Duplicati.Library.Backend.AlternativeFTP.csproj
# Duplicati/Library/Backend/AlternativeFTP/app.config
# Duplicati/Library/Backend/AlternativeFTP/packages.config
# Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj
# Duplicati/Library/Backend/AzureBlob/packages.config
# Duplicati/Library/Backend/Backblaze/Duplicati.Library.Backend.Backblaze.csproj
# Duplicati/Library/Backend/Backblaze/packages.config
# Duplicati/Library/Backend/Box/Duplicati.Library.Backend.Box.csproj
# Duplicati/Library/Backend/Box/packages.config
# Duplicati/Library/Backend/CloudFiles/Duplicati.Library.Backend.CloudFiles.csproj
# Duplicati/Library/Backend/CloudFiles/app.config
# Duplicati/Library/Backend/Dropbox/Duplicati.Library.Backend.Dropbox.csproj
# Duplicati/Library/Backend/Dropbox/packages.config
# Duplicati/Library/Backend/FTP/Duplicati.Library.Backend.FTP.csproj
# Duplicati/Library/Backend/FTP/app.config
# Duplicati/Library/Backend/File/Duplicati.Library.Backend.File.csproj
# Duplicati/Library/Backend/File/app.config
# Duplicati/Library/Backend/GoogleServices/Duplicati.Library.Backend.GoogleServices.csproj
# Duplicati/Library/Backend/GoogleServices/packages.config
# Duplicati/Library/Backend/HubiC/Duplicati.Library.Backend.HubiC.csproj
# Duplicati/Library/Backend/Jottacloud/Duplicati.Library.Backend.Jottacloud.csproj
# Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj
# Duplicati/Library/Backend/Mega/packages.config
# Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj
# Duplicati/Library/Backend/OAuthHelper/packages.config
# Duplicati/Library/Backend/OneDrive/Duplicati.Library.Backend.OneDrive.csproj
# Duplicati/Library/Backend/OneDrive/packages.config
# Duplicati/Library/Backend/OpenStack/Duplicati.Library.Backend.OpenStack.csproj
# Duplicati/Library/Backend/OpenStack/packages.config
# Duplicati/Library/Backend/Rclone/Duplicati.Library.Backend.Rclone.csproj
# Duplicati/Library/Backend/Rclone/packages.config
# Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj
# Duplicati/Library/Backend/S3/app.config
# Duplicati/Library/Backend/S3/packages.config
# Duplicati/Library/Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj
# Duplicati/Library/Backend/SSHv2/packages.config
# Duplicati/Library/Backend/SharePoint/Duplicati.Library.Backend.SharePoint.csproj
# Duplicati/Library/Backend/SharePoint/app.config
# Duplicati/Library/Backend/Sia/Duplicati.Library.Backend.Sia.csproj
# Duplicati/Library/Backend/Sia/packages.config
# Duplicati/Library/Backend/TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj
# Duplicati/Library/Backend/TahoeLAFS/packages.config
# Duplicati/Library/Backend/Tardigrade/Duplicati.Library.Backend.Tardigrade.csproj
# Duplicati/Library/Backend/Tardigrade/packages.config
# Duplicati/Library/Backend/WEBDAV/Duplicati.Library.Backend.WEBDAV.csproj
# Duplicati/Library/Backend/WEBDAV/app.config
# Duplicati/Library/Common/Duplicati.Library.Common.csproj
# Duplicati/Library/Common/IO/SystemIOWindows.cs
# Duplicati/Library/Common/app.config
# Duplicati/Library/Common/packages.config
# Duplicati/Library/Compression/Duplicati.Library.Compression.csproj
# Duplicati/Library/Compression/app.config
# Duplicati/Library/Compression/packages.config
# Duplicati/Library/DynamicLoader/Duplicati.Library.DynamicLoader.csproj
# Duplicati/Library/DynamicLoader/app.config
# Duplicati/Library/Encryption/Duplicati.Library.Encryption.csproj
# Duplicati/Library/Encryption/packages.config
# Duplicati/Library/Interface/Duplicati.Library.Interface.csproj
# Duplicati/Library/Localization/Duplicati.Library.Localization.csproj
# Duplicati/Library/Localization/packages.config
# Duplicati/Library/Logging/Duplicati.Library.Logging.csproj
# Duplicati/Library/Logging/app.config
# Duplicati/Library/Main/Duplicati.Library.Main.csproj
# Duplicati/Library/Main/app.config
# Duplicati/Library/Main/packages.config
# Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj
# Duplicati/Library/Modules/Builtin/packages.config
# Duplicati/Library/SQLiteHelper/Duplicati.Library.SQLiteHelper.csproj
# Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj
# Duplicati/Library/Snapshots/app.config
# Duplicati/Library/Snapshots/packages.config
# Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj
# Duplicati/Library/UsageReporter/packages.config
# Duplicati/Library/Utility/Duplicati.Library.Utility.csproj
# Duplicati/Library/Utility/app.config
# Duplicati/Library/Utility/packages.config
# Duplicati/License/Duplicati.License.csproj
# Duplicati/Server/Duplicati.Server.Serialization/Duplicati.Server.Serialization.csproj
# Duplicati/Server/Duplicati.Server.Serialization/packages.config
# Duplicati/Server/Duplicati.Server.csproj
# Duplicati/Server/app.config
# Duplicati/Server/packages.config
# Duplicati/Service/Duplicati.Service.csproj
# Duplicati/Service/app.config
# Duplicati/Tools/Duplicati.Tools.csproj
# Duplicati/UnitTest/Duplicati.UnitTest.csproj
# Duplicati/UnitTest/RestoreHandlerTests.cs
# Duplicati/UnitTest/app.config
# Duplicati/UnitTest/packages.config
# Duplicati/WindowsService/App.config
# Duplicati/WindowsService/WindowsService.csproj
# Tools/SQLiteTool/App.config
# Tools/SQLiteTool/SQLiteTool.csproj
# thirdparty/TlsTest/TlsTest.csproj
# thirdparty/UnixSupport/UnixSupport.csproj
# thirdparty/mozroots/mozroots.csproj
2020-12-29 09:59:42 -08:00
Kenneth Skovhede and GitHub
ca073a2d0c
Merge pull request #4380 from warwickmm/fix_purge_broken_files_dry_run
...
Fix error encountered during dry-run of purge-broken-files
2020-12-19 14:44:21 +01:00
Kenneth Hsu
780f53b89a
Add test for purging broken files with dry-run.
...
This concerns #4379 .
2020-11-30 19:56:08 -08:00
Kenneth Hsu
6570cd954c
Add test for specifying remote URL using run-script-before.
...
This concerns issue #3651 .
2020-11-01 14:19:09 -08:00
Kenneth Hsu
ca5aad9ccb
Allow custom commands to be provided to CreateScript test helper.
2020-11-01 13:14:00 -08:00
Kenneth Skovhede and GitHub
40416560e6
Merge pull request #4352 from duplicati/feature/new_unittest_datahost
...
Changed unittes datahost to reduce S3 transfer charges
2020-10-27 11:28:50 +01:00
Kenneth Skovhede
5fd1c883e3
Changed to using a proxied host to reduce S3 transfer charges from unittests
2020-10-19 00:44:10 +02:00
Kenneth Hsu
d5b6386cfe
Use helper method to compare contents of directories.
2020-09-27 14:06:03 -07:00
Kenneth Hsu
a8b0df57d4
Avoid clock issues when quickly running successive backups in tests.
...
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.
2020-09-27 10:44:25 -07:00
Kenneth Skovhede and GitHub
a5cea90867
Merge pull request #4293 from warwickmm/fix_export_encoding
...
Avoid decoding URL parameters when removing passwords
2020-09-23 11:10:02 +02:00
Dean Ferreyra
a3c27a2ba2
Add Assert.Fail to catch unexpected symlink policies
2020-09-13 08:12:23 -07:00
Dean Ferreyra
641a590d89
For "Ignore" policy, also ensure a file doesn't exist
2020-09-12 20:33:39 -07:00
Dean Ferreyra
e3b8a12ec1
Unit test improvements per review comments
2020-09-12 17:03:48 -07: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
0367418925
Fix typo in log and assert messages
2020-09-12 10:52:01 -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
Dean Ferreyra
f56f64e541
Merge branch 'master' into symlink_unit_tests
2020-09-09 20:03:32 -07:00
Dean Ferreyra
be6ac941ea
Add symlink policy tests
...
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]
```
2020-09-07 22:50:21 -07:00
Dean Ferreyra
93601d0a82
Address review comments from @warwickmm
2020-09-07 18:56:59 -07:00
Dean Ferreyra
27da5a4dc7
Include Windows in tests for directory names with wildcards
2020-09-06 15:00:48 -07:00
Kenneth Hsu
7d13d9ed81
Add tests for directory names with wildcards.
2020-09-05 15:05:11 -07:00
Kenneth Hsu
c15cdcf26a
Remove unused local variable.
2020-08-24 07:49:14 -07:00
Kenneth Hsu
5915fdfba9
Add test for exporting backup configuration to JSON.
...
This tests that we escape '@' with '%40', as the import code in
escape_uri in AppUtils.js cannot handle '@'.
This concerns issue #3619 .
2020-08-24 07:41:00 -07:00
Kenneth Hsu
9dd98457f1
Clean up code.
2020-08-24 07:41:00 -07:00
Kenneth Hsu
acba6351dc
Extract local function to method.
2020-08-24 07:41:00 -07:00
Kenneth Skovhede and GitHub
ec1975b5a7
Merge pull request #4269 from warwickmm/target_net_471
...
Target .NET Framework 4.7.1
2020-08-07 10:50:35 +02:00
Kenneth Skovhede and GitHub
04dd510be0
Merge pull request #4261 from warwickmm/avoid_deleting_unrelated_files
...
Avoid deleting unrelated files when removing backup configuration
2020-08-07 10:33:31 +02:00
Kenneth Skovhede and GitHub
e5b0ac2749
Merge pull request #4260 from warwickmm/remove_unnecessary_path_combine
...
Remove unnecessary call to Path.Combine
2020-08-07 10:31:47 +02:00
Kenneth Skovhede and GitHub
2d628053fa
Merge pull request #4259 from warwickmm/test_check_warnings_and_errors
...
Check for errors and warnings in unit tests
2020-08-07 10:30:21 +02:00
Kenneth Skovhede and GitHub
ac5dda8be7
Merge pull request #4257 from warwickmm/test_invalid_windows_paths
...
Add tests for invalid Windows paths
2020-08-07 10:29:54 +02:00
warwickmm and GitHub
8f631a99f0
Merge pull request #4274 from dferreyra/CommandLineOperationsTests_setup
...
Fix setup/teardown for CommandLineOperationsTests
2020-07-31 16:55:26 -07:00
Kenneth Hsu
d99d40717d
Merge remote-tracking branch 'upstream/master' into test_invalid_windows_paths
...
This allows us to simplify the ProblematicPathTests because the test
teardown methods can now handle deleting directories containing
problematic paths.
2020-07-31 16:29:28 -07:00
Dean Ferreyra
c70508b96e
Fix setup/teardown for CommandLineOperationsTests
...
Change Duplicati.UnitTest.CommandLineOperationsTests to use `Setup()`
instead of `OneTimeSetUp()` to make sure the test files are in place
for each test.
This fixes #4273 .
2020-07-31 07:47:09 -07:00
Dean Ferreyra
2e777b2711
Change tests to work with long paths in Windows
...
Change SystemIOWindows.PathGetFullPath() to convert forward
slashes to backslashes.
Change Duplicati.UnitTest.BasicSetupHelper.ZipFileExtractToDirectory()
to rely on slash fix-ups.
2020-07-30 05:08:18 -07:00
Dean Ferreyra
73e31a79a1
Change tests to work with long paths in Windows
...
Even in .NET 4.6.2
`System.IO.Compression.ZipFile.ExtractToDirectory()` cannot handle
long paths. Replace call to
`System.IO.Compression.ZipFile.ExtractToDirectory()` with an
equivalent that extracts files to a temporary location and uses I/O
functions that support long paths to move them to their final
location.
In CommandLineOperationsTests.cs, use ISystemIO functions to handle
potentially long paths.
Add a fix to RecoveryTool for long paths that was missed by #4258 .
This fixes #3863 .
2020-07-28 05:51:53 -07:00
Kenneth Hsu
e964072690
Target .NET Framework 4.7.1.
...
This updates all projects to target .NET Framework 4.7.1. The
TencentCOS and Tardigrade backends depend on .NET Standard 2.0. When a
.NET Framework prior to 4.7.1 is targeted, the system cannot be sure
that all the dependencies exist, so it copies all dependent assemblies
to the output directory. This causes many assemblies from the System
namespace to become bundled in the release.
https://stackoverflow.com/a/48875007
We had previously attempted to make individual projects target 4.7.1
(see pull request #4242 ), but this can cause compatibility issues when
4.6.2 projects depend on 4.7.1. projects.
This will require Mono 5.10.0 or greater (previously, we required 5.0.0
or greater).
https://www.mono-project.com/docs/about-mono/releases/5.10.0/#class-libraries
This fixes issue #4234 .
2020-07-26 19:46:01 -07:00
Kenneth Hsu
ef8209bc21
Add test to verify number of included paths.
2020-07-23 19:46:23 -07:00
Kenneth Hsu
443514dabd
Rename test method.
2020-07-23 19:44:10 -07:00
Kenneth Hsu
466bc3786b
Extract creation of problematic file to method.
2020-07-23 19:43:24 -07:00
Kenneth Hsu
1b7d1533ee
Add test for excluding problematic paths.
2020-07-23 19:40:00 -07:00
Kenneth Hsu
0314c388ef
Rename test method.
2020-07-21 13:49:41 -07:00
Kenneth Hsu
00cd10062b
Add test to check that only backend files with correct prefix are deleted.
...
This concerns issue #2678 .
2020-07-21 13:20:42 -07:00
Kenneth Hsu
77a4918f36
Add test to check that only relevant backend files are deleted.
...
This concerns issues #3845 , and #4244 .
2020-07-21 13:20:42 -07:00
Kenneth Hsu
f47299d7a1
Remove unnecessary call to Path.Combine.
2020-07-20 20:08:14 -07:00
Kenneth Hsu
27c5b9ef5a
Check for errors and warnings in unit tests.
2020-07-19 19:51:05 -07:00
Kenneth Hsu
654ca45892
Verify contents of restored problematic paths.
...
This is somewhat redundant since the RestoreHandler verifies the hash of
the restored file, but it doesn't hurt to check again.
2020-07-19 14:07:26 -07:00
Kenneth Hsu
941c8892b0
Rename test methods.
2020-07-18 18:54:10 -07:00