Commit Graph

48 Commits

Author SHA1 Message Date
Kenneth Skovhede 508cd56502 Register backend for test 2024-04-27 15:04:18 +02:00
Kenneth Skovhede c4eab9ce82 Fixed infinite loop in test 2024-04-18 18:21:10 +02:00
Kenneth Skovhede bb99a4a6b1 Made the unittest download more robust 2024-04-18 15:34:34 +02:00
Kenneth Skovhede 115e887802 Implemented new updater logic that supports multi-arch distributions. 2024-03-15 14:18:56 +01:00
Kenneth Skovhede 473c6cbbb8 Merge commit '4f577c65a4d8806f79637c50c21ca3a683c5a07a' into feature/kestrel-avalonia-upgrade 2024-03-04 12:21:53 +01:00
Thomas Suckow a3bbf63561 Merge remote-tracking branch 'origin/feature/upgrade-to-sdk-style-projects' into feature/net5-kestrel
# Conflicts:
#	.appveyor.yml
#	.github/workflows/tests.yml
#	BuildTools/AutoUpdateBuilder/AutoUpdateBuilder.csproj
#	BuildTools/DependencyFinder/DependencyFinder.csproj
#	BuildTools/GnupgSigningTool/GnupgSigningTool.csproj
#	BuildTools/UpdateVersionStamp/UpdateVersionStamp.csproj
#	Duplicati CommandLine Only.sln
#	Duplicati.Library.RestAPI/RESTMethods/RequestInfo.cs
#	Duplicati.Library.RestAPI/Runner.cs
#	Duplicati.sln
#	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/app.config
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/Assets/icons/normal-warning.png
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/Program.cs
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/app.config
#	Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj
#	Duplicati/Library/Backend/AlternativeFTP/Duplicati.Library.Backend.AlternativeFTP.csproj
#	Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj
#	Duplicati/Library/Backend/Backblaze/Duplicati.Library.Backend.Backblaze.csproj
#	Duplicati/Library/Backend/Box/Duplicati.Library.Backend.Box.csproj
#	Duplicati/Library/Backend/CloudFiles/Duplicati.Library.Backend.CloudFiles.csproj
#	Duplicati/Library/Backend/Dropbox/Duplicati.Library.Backend.Dropbox.csproj
#	Duplicati/Library/Backend/FTP/Duplicati.Library.Backend.FTP.csproj
#	Duplicati/Library/Backend/File/Duplicati.Library.Backend.File.csproj
#	Duplicati/Library/Backend/GoogleServices/Duplicati.Library.Backend.GoogleServices.csproj
#	Duplicati/Library/Backend/HubiC/Duplicati.Library.Backend.HubiC.csproj
#	Duplicati/Library/Backend/Idrivee2/Duplicati.Library.Backend.Idrivee2.csproj
#	Duplicati/Library/Backend/Jottacloud/Duplicati.Library.Backend.Jottacloud.csproj
#	Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj
#	Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj
#	Duplicati/Library/Backend/OneDrive/Duplicati.Library.Backend.OneDrive.csproj
#	Duplicati/Library/Backend/OpenStack/Duplicati.Library.Backend.OpenStack.csproj
#	Duplicati/Library/Backend/Rclone/Duplicati.Library.Backend.Rclone.csproj
#	Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj
#	Duplicati/Library/Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj
#	Duplicati/Library/Backend/SharePoint/Duplicati.Library.Backend.SharePoint.csproj
#	Duplicati/Library/Backend/Sia/Duplicati.Library.Backend.Sia.csproj
#	Duplicati/Library/Backend/Storj/Duplicati.Library.Backend.Storj.csproj
#	Duplicati/Library/Backend/TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj
#	Duplicati/Library/Backend/Tardigrade/Duplicati.Library.Backend.Tardigrade.csproj
#	Duplicati/Library/Backend/TencentCOS/Duplicati.Library.Backend.TencentCOS.csproj
#	Duplicati/Library/Backend/WEBDAV/Duplicati.Library.Backend.WEBDAV.csproj
#	Duplicati/Library/Common/Duplicati.Library.Common.csproj
#	Duplicati/Library/Compression/Duplicati.Library.Compression.csproj
#	Duplicati/Library/DynamicLoader/Duplicati.Library.DynamicLoader.csproj
#	Duplicati/Library/Encryption/Duplicati.Library.Encryption.csproj
#	Duplicati/Library/Interface/Duplicati.Library.Interface.csproj
#	Duplicati/Library/Localization/Duplicati.Library.Localization.csproj
#	Duplicati/Library/Logging/Duplicati.Library.Logging.csproj
#	Duplicati/Library/Main/Duplicati.Library.Main.csproj
#	Duplicati/Library/Modules/Builtin/CheckMonoSSL.cs
#	Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj
#	Duplicati/Library/Modules/Builtin/SendJabberMessage.cs
#	Duplicati/Library/SQLiteHelper/Duplicati.Library.SQLiteHelper.csproj
#	Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj
#	Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj
#	Duplicati/Library/Utility/Duplicati.Library.Utility.csproj
#	Duplicati/Library/Utility/HashAlgorithmHelper.cs
#	Duplicati/Library/Utility/Power/WindowsPowerSupplyState.cs
#	Duplicati/License/Duplicati.License.csproj
#	Duplicati/Server/Duplicati.Server.Serialization/Duplicati.Server.Serialization.csproj
#	Duplicati/Server/Duplicati.Server.csproj
#	Duplicati/Server/app.config
#	Duplicati/Service/Duplicati.Service.csproj
#	Duplicati/Service/app.config
#	Duplicati/Tools/Duplicati.Tools.csproj
#	Duplicati/UnitTest/Duplicati.UnitTest.csproj
#	Duplicati/UnitTest/GeneralBlackBoxTesting.cs
#	Duplicati/UnitTest/app.config
#	Duplicati/WindowsService/WindowsService.csproj
#	Installer/debian/docker/debian/control
#	Tools/SQLiteTool/SQLiteTool.csproj
#	Tools/ZipFileDebugger/ZipFileDebugger.csproj
#	guiTests/guiTest.py
#	thirdparty/UnixSupport/UnixSupport.csproj
#	thirdparty/alphavss/Homepage.txt
#	thirdparty/alphavss/License.txt
#	thirdparty/alphavss/licensedata.json
2024-02-29 21:55:17 -08:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01: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
Thomas Suckow 5956b771f0 Cleanup inconsistent overrides of test SetUp and TearDown.
Also add some memory usage diagnostics
2022-05-05 22:30:15 -07: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 Skovhede 5fd1c883e3 Changed to using a proxied host to reduce S3 transfer charges from unittests 2020-10-19 00:44:10 +02:00
Dean Ferreyra 0367418925 Fix typo in log and assert messages 2020-09-12 10:52:01 -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
warwickmm 8f631a99f0 Merge pull request #4274 from dferreyra/CommandLineOperationsTests_setup
Fix setup/teardown for CommandLineOperationsTests
2020-07-31 16:55:26 -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 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 2aa76881a5 Mark fields that don't need to be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2019-10-19 13:59:22 -07:00
BlueBlock 90ab4856b2 use variable in place of string 2019-08-25 17:30:35 -04:00
BlueBlock 81eb1ba58c update references 2019-08-25 13:43:46 -04:00
BlueBlock 8a9a72e2b0 conditional download of data.zip
only download data.zip if either it is missing locally and has been updated on s3
2019-08-25 13:34:30 -04:00
BlueBlock 1f952b8628 add optional use of a local data-alternative.zip in place of data.zip 2019-08-25 10:59:14 -04:00
BlueBlock 0d36592887 faster to use a dir move isntead of copying everything 2019-08-25 10:52:41 -04:00
Kenneth Hsu 9f23597c2b Extract duplicated path specifications to private property. 2019-08-18 17:46:13 -07:00
Kenneth Hsu d29c9e090d Delete restore folder after each test. 2019-08-18 16:01:54 -07:00
Kenneth Hsu e2fda04a4c Delete test zip files and folders after tests complete. 2019-08-18 15:31:15 -07:00
Kenneth Hsu baf3b6d52a Rename methods to clarify behaviors. 2019-08-18 14:27:01 -07:00
Kenneth Hsu d364be4037 Clean test data after each test. 2019-08-18 14:27:01 -07:00
Kenneth Hsu 5471e84eb0 Move download of test data to setup method.
This allows one to more easily run the unit tests locally.
2019-08-18 14:01:31 -07:00
Kenneth Hsu 1f66936c4c Remove redundant deletiong of test data.
The folders are now deleted in the teardown method.
2019-08-18 14:01:31 -07:00
Kenneth Hsu a9846f08f4 Remove unnecessary method override. 2019-08-17 19:54:57 -07:00
BlueBlock 22ca352a3f Add check for test data requirement to unittest for min of 3 test directories 2019-07-16 13:58:07 -04:00
Kenneth Hsu 731a8b1644 Remove unused empty methods. 2018-10-10 21:20:40 -07:00
Kenneth Skovhede 8427774d85 Added more aggressive testing of data during unittest 2018-06-13 21:42:34 +02:00
Kenneth Skovhede 1322455786 Improved output when running unittest 2018-06-12 08:52:57 +02:00
Kenneth Skovhede ae17df3736 Minor fix to the unittest output 2018-06-11 11:22:03 +02:00
verhoek d9fc1cac08 Moved travis script steps to separate bash script with trap on error, to prevent continuing executing further steps on error. 2018-05-18 07:57:55 +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 e65d38e235 Updated the unittest to not use the deprecated NUnit attributes 2018-02-01 09:48:55 +01:00
Kenneth Skovhede 2609dcc5dc Fixes after library updates 2017-09-23 14:52:53 +02:00
Kenneth Skovhede 7349d73e80 Fixed returning non-zero status codes when verification fails 2017-03-07 23:09:04 +01:00
Kenneth Skovhede f3fa60e49f Upgrade NUnit to use 3.4.1 (#1959)
Updated NUnit to version 3.4.1 and added some extra display helps to Travis
2016-09-29 13:45:55 +02:00
Kenneth Skovhede 0c68daff6c Fixed all whitespace to be 4 spaces instead of tabs 2016-09-15 11:39:27 +02:00
Kenneth Skovhede ec193a7a58 Added unittest categories 2016-06-29 23:00:37 +02:00
Kenneth Skovhede 6dd9aa2702 Delete target folder before running unittest to allow multiple runs with the same data 2016-01-26 23:30:03 +01:00
Kenneth Skovhede beed30f398 Added SizeOmittingBackend to the unittests to test to test if backends which have no size reporting capabilities cause problems 2015-09-17 20:04:49 +02:00
Kenneth Skovhede 6dac0f3c2e Fixed an invalid line-ending character 2015-08-05 13:51:56 +02:00
Kenneth Skovhede e6a8cdd6be Refactored the commandline unittest for easier reuse 2015-07-10 10:23:54 +02:00
Kenneth Skovhede b01af6e057 Implemented more unittests 2015-04-10 22:29:52 +02:00