Commit Graph
40 Commits
Author SHA1 Message Date
Kenneth Skovhede 473c6cbbb8 Merge commit '4f577c65a4d8806f79637c50c21ca3a683c5a07a' into feature/kestrel-avalonia-upgrade 2024-03-04 12:21:53 +01:00
Kenneth Skovhede d7f027b9e2 Fixed usings in unit tests 2024-03-03 15:41:49 +01:00
Kenneth Skovhede aa20088c39 Tool based upgrade of all projects with some manual update 2024-03-01 14:29:54 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01: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
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
Kenneth Hsu 4a1697bb27 Remove commented-out code. 2020-07-08 17:37:08 -07:00
Kenneth Hsu 0e994ea4f1 Avoid checking for warnings in some BorderTests.
The current test data sometimes yields a "No block hash found for file"
warning.
2020-07-07 19:21:35 -07:00
Kenneth Hsu e1a6ae4483 Check operation results for errors and warnings in tests. 2020-07-05 18:50:10 -07:00
Kenneth Hsu caaedccc61 Remove recreated database file after each test. 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 d364be4037 Clean test data after each test. 2019-08-18 14:27:01 -07:00
Kenneth Hsu a6f751f605 Move creation of test data folders to base class. 2019-08-18 14:01:27 -07:00
Mikael Mello 965bd6d761 result-classes: rename properties of RestoreResults to be consistent with BackupResults 2018-12-12 12:14:11 -02:00
verhoek 4494e43ad8 Simplification. 2018-10-28 16:47:13 +01:00
Kenneth Hsu 9ce1e807c7 Remove unused variables and fields. 2018-09-29 10:41:27 -07:00
Kenneth Skovhede d0026d8028 Reworked the file-path query, and enabled experimentally changing it by setting the environment variable TEST_QUERY_VERSION=1 or TEST_QUERY_VERSION=2.
Added check to the unittests to catch cases where it scans too many files.
2018-08-13 13:23:59 +02:00
Kenneth Skovhede 52cb9fb1f9 Removed the deprecated --store-metadata option.
Rewrote the logic for pre-filtering files based on timestamps/metadata to be more verbose and well documented.
Fixed an issue where `--check-filetime-only` also checked the file size, which was not present due to the reduced query used to grab only the lastmodified information.
Fixed a problem where the check for existing metadata was wrong and produced a warning.

This fixes #3204
This handles some of #3194
2018-08-11 11:48:19 +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 9093603be1 Added support for disabling the file scanner during backups.
This fixes #2963
2018-02-11 20:57:38 +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 76aae5de7b Changed the logic for getting the last-modified timestamp from the database.
Now we only look at the timestamp from the previous fileset, instead of for the last time the file was seen.
This should improve lookup times, and thus the running time for backups with many files.

This change means that the following sequence of operations will react differently:

- backup
- delete file
- backup
- undelete file
- backup

Prior to this commit, the undeleted file would be seen with the original timestamp and thus can avoid being scanned for changes.
After this commit, the file will be treated as a new file, even if it has the previous timestamp and will thus be scanned for changes.

An additional switch has been introduced, --check-filetime-only that improves the lookup further by not looking at the metadata or filesize, and thus makes a much lighter call to the database, where fewer tables need to be touched.
2017-01-05 10:03:32 +01:00
Kenneth Skovhede 4bf4871427 Added commandline operation to purge select files from filesets.
This fixes #1009.
This paves the way for #1337.
2016-12-29 22:41:13 +01:00
Kenneth Skovhede 3939f038ae Added unitttest to catch problems with metadata computation 2016-11-08 10:47:18 +01:00
Kenneth Skovhede 309bf1648d Merge branch 'master' into feature/fix_for_different_blockhash_and_filehash_plus_multiblocks_metadata
# Conflicts:
#	Duplicati/Library/Main/Database/LocalDatabase.cs
#	Duplicati/Library/Main/Database/LocalRecreateDatabase.cs
#	Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
#	Duplicati/UnitTest/BorderTests.cs
2016-10-17 13:28:27 +02:00
Kenneth SkovhedeandGitHub 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 d2e01d11b1 Added unittests that tests for setups with no index files, and partial index files. 2016-05-02 20:33:34 +02:00
Kenneth Skovhede df58a97e15 Improved debug-ability for unittests by not deleting the database, but instead creating a new side-by-side database. 2016-04-06 20:42:52 +02:00
Kenneth Skovhede d5e4194978 Added extra test for testing with metadata disabled 2016-04-05 00:27:14 +02:00
Kenneth Skovhede f063143279 Re-enable mixed block/filehash tests as it now works 2016-04-04 18:19:35 +02: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 406ecdd336 Added restore check to unittest 2016-04-01 00:15:56 +02:00
Kenneth Skovhede 450ee501fd Expanded border tests with additional edge cases 2016-03-31 20:28:08 +02:00
Kenneth Skovhede 6e1a0d3df5 Fixed applying the overrides 2016-03-31 20:15:21 +02:00
Kenneth Skovhede 8d0a42e33d Added additional unittest to verify that using a different filehash and blockhash works 2016-03-30 20:33:15 +02:00
Kenneth Skovhede fcff385c35 Added additional test cases to the unittest to check for files with size zero and 1 byte. 2016-03-30 20:32:47 +02:00
Kenneth Skovhede 201c5c99a9 Fixed the unittest to actually test the odd blocksize values 2016-03-27 12:51:02 +02:00
Kenneth Skovhede 057ac8f707 Added additional tests for checking non-standard settings and borderline cases 2016-03-18 14:33:37 +01:00
Kenneth Skovhede cbe6b959e8 Added new unittest that makes sure strange files with repeated content and sizes around the block-size are handled correctly 2016-03-17 22:23:45 +01:00