Commit Graph
84 Commits
Author SHA1 Message Date
Kenneth Skovhede 04d5a7fcb2 Removed output spam from a unittest 2018-03-15 12:29:53 +01: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 bd863016fa Added support for returning multiple DNS names for cache invalidation.
Updated most backends to return the actual DNS names for cache invalidation.
2018-02-26 11:37:10 +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
wjan d8efebfe8a corrects changes in app.config files and other unnecessary file changes 2018-01-18 21:22:54 +01:00
wjan 8500988d7c adds rclone UI and backend improvements 2018-01-10 15:33:28 +01:00
Kenneth SkovhedeandGitHub 9593edae14 Merge pull request #2939 from vnau/master
Compression classes refactoring
2017-12-26 12:27:35 +01:00
vnau 62a7901aca Compression modules refactored to work with streams instead of filenames;
Added unit test to check compression reversibility
2017-12-25 04:12:19 +07:00
Kenneth Hsu 839c8d9f27 Use method to parse string into bool to reduce duplication. 2017-12-17 14:52:29 -08:00
Kenneth Hsu faad6de7ba Add tests for parsing string into bool. 2017-12-17 14:52:29 -08:00
Kenneth SkovhedeandGitHub 36aadc4ad1 Merge pull request #2910 from warwickmm/refactor/remove_redundant_tostring
Remove redundant calls to ToString
2017-11-27 08:50:00 +01:00
Kenneth Hsu 5fb1958ceb Remove redundant calls to ToString. 2017-11-26 15:44:34 -08:00
Kenneth Hsu 8810e0130d Make string comparisons use ordinal (binary) sort rules.
These string comparisons should not be culture-aware.
2017-11-26 11:19:54 -08:00
Kenneth Hsu c9aa6cf5fb Avoid performing tilde expansion.
The expansion being performed was often incorrect, as it's possible for
the tilde character to appear as part of the path where it should not be
expanded to the user's home directory.

Properly supporting tilde expansion is complicated and requires
additional study.  Instead of supporting it only partially, we have
decided to simplify things and just drop tilde expansion for now.  See
the discussion in issue #2619, as well as issues #2325 and #2555.
2017-10-21 10:08:33 -07:00
Kenneth Skovhede f0cfde1cb2 Added delays to unittest as it is now too fast with the improved hashing library 2017-10-10 13:52:57 +02:00
Kenneth Hsu 9edec2b53e Add comments to clarify tests. 2017-09-29 21:10:21 -07:00
Kenneth Hsu ff7d57a9f4 Add test for obtaining unique items from empty collection. 2017-09-29 21:09:29 -07:00
Kenneth Hsu cb4972f900 Add test for obtaining unique items with custom comparer. 2017-09-28 21:30:29 -07:00
Kenneth Hsu 705bbe198f Modify test to use string data.
This will allow us to more easily test the case where a custom equality
comparer is provided.
2017-09-28 21:30:29 -07:00
Kenneth Hsu c658458e01 Add unit test for method to get unique items. 2017-09-28 21:30:29 -07:00
Kenneth SkovhedeandGitHub 33314ce7c9 Merge pull request #2763 from tygill/fix/list-ienumerable
Change IBackend.List() to return IEnumerable instead of List
2017-09-28 11:06:41 +02:00
Kenneth Skovhede 51084ada57 Merge branch 'feature/use-faster-hashing' 2017-09-26 14:24:20 +02:00
Kenneth Skovhede 640ec634b7 Increased delays in unittest due to faster hashing performance 2017-09-26 09:41:27 +02:00
Tyler Gill 38883285ee Change IBackend.List() to return IEnumerable instead of List
By changing to IEnumerable, it is possible to iterate only a portion of the list, which is useful when not all entries are needed (e.g., when testing a connection).
All existing backends have been updated, and any which were able to be changed to yield return results in a straightforward way now do.
Many backends had a try/catch in the List() method. Due to the fact that yield returns can't be placed within a try/catch block, these have been refactored to either scope the try/catch to the parts that (should) be the only places throwing exceptions, so that exceptions are still caught and handled.
Note that lazy evaluation may cause some changes in behavior - exceptions that were previously thrown at the point of invokation of List() may now be thrown while it is being enumerated.
I believe this will not be problematic though, as the only well-known exception seems to be FolderMissingException, which should be thrown by Test(), but TestList() attempts to enumerate the list to force this exception.
Any places that require the legacy behavior can get it by simply converting the lazy enumerable to a List()
2017-09-25 23:17:45 -06:00
Kenneth Skovhede 22e05577e2 Revert "Updated nunit"
This reverts commit e999f1d77d.
2017-09-23 14:57:05 +02:00
Kenneth Skovhede 2609dcc5dc Fixes after library updates 2017-09-23 14:52:53 +02:00
Kenneth Skovhede e999f1d77d Updated nunit 2017-09-23 14:48:02 +02:00
Tyler Gill 83a1dcfb64 Replace all instances of InvariantCultureIgnoreCase with OrdinalIgnoreCase in string comparisons.
InvariantCulture is useful when comparing / sorting human language strings in a culturely correct way. It handles things like accented letters in a way that makes sense to humans (e.g., 'a' should be sorted next to 'á', rather than after 'z').
Ordinal looks just at the raw code points of the characters. As such, it is recommended for use in cases when comparing system strings (file paths, command line parameters, config settings, etc.). Since it doesn't need to use the culture specific sorting rules, this method can often be faster.

For more information, see https://stackoverflow.com/questions/492799/difference-between-invariantculture-and-ordinal-string-comparison (and other related questions)
2017-09-18 23:55:08 -06:00
Kenneth Skovhede 6855824285 Rewrote the commandline to support plug-able output 2017-04-04 16:57:30 +02:00
Kenneth Skovhede 7349d73e80 Fixed returning non-zero status codes when verification fails 2017-03-07 23:09:04 +01:00
Kenneth Skovhede 680ee82189 Updated SharpCompress to the latest version 2017-02-27 22:21:01 +01:00
Kenneth Skovhede 5f9539b9ea Fixed creating the temporary folder for the unittest data before using it 2017-01-12 08:41:34 +01:00
Kenneth Skovhede 37ee4d4cf8 Fixed an issue with broken logging in the unittest 2017-01-11 22:41:45 +01:00
Kenneth Skovhede e692be5c92 Reworked the way log messages are handled, to include call-context setup.
This enables modules to report messages to the message-sink, and thus to the commandline through the normal interface.
This simplifies handling multiple logging systems, and supports reporting logging from multiple concurrent controller instances.

This fixes #2225
This fixes #1575
2017-01-09 23:27:56 +01:00
Kenneth Skovhede 9c0b463765 Added minor delays to purge unittest to avoid errors that happen when timestamps are back-to-back 2017-01-06 23:00:30 +01:00
Kenneth Skovhede 1b4cb3b5df Merge branch 'feature/implement_remote_file_recovery' 2017-01-05 22:16:25 +01:00
Kenneth Skovhede 1108d51d7f Implemented a new new list-broken-files and purge-broken-files command for the commandline to assist with handling remote file loss. 2017-01-05 16:46:01 +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 e69cec8dd6 Fixed purge unittest by delaying final backup such that the modified timestamp is not in the future 2017-01-01 20:09:29 +01:00
Kenneth Skovhede 33694ba45e Additional debugging information for Travis debug 2016-12-31 11:11:46 +01:00
Kenneth Skovhede e1a989ca32 Merge branch 'feature/add_purge_command' 2016-12-30 00:39:59 +01:00
Kenneth Skovhede 15de17c86d Fixed error messages in purge unittest 2016-12-30 00:08:14 +01:00
Kenneth Skovhede 52eb8e8478 Disabled MSBuild for much faster builds on MacOS 2016-12-29 23:12:41 +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 24ec8ede9b Updated nunit 2016-11-10 10:32:36 +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 a0368d5f30 Added support for reporting backend size when --no-backend-verification is supplied.
This fixes #1723
2016-09-23 13:46:42 +02:00