Commit Graph
38 Commits
Author SHA1 Message Date
Kenneth Skovhede fcc95fa936 Fixed flaky test 2024-04-18 11:49:39 +02:00
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 e1a6ae4483 Check operation results for errors and warnings in tests. 2020-07-05 18:50:10 -07:00
Sean Templeton d5e064ae45 Fix a few more issues with stop now
When a backup is interrupted it will now show as a partial backup in the list of backups on the restore files page.

Temporary filelist volumes are protected from deletion in several places. All but the RestoreHandler
only protect the most recent filelist. The RestoreHandler protects all temporary filelist volumes as the user
might be restoring from one that would be deleted.

Prevent the CoCoL BackendRequests channel is retired exception from appearing when the backup is stopped by checking
if the channel is retired before trying to add the FlushRequest to the channel. Any exceptions from the BackendUploader
task will still be thrown.
2020-03-01 21:19:07 -06:00
Sean Templeton 446120ae3e A synthetic filelist could not be uploaded due to the logic in UploadSyntheticFilelist. The code passing in the fileset id to the class would get the id based on if the volume was in the Temporary or Uploading states. If the volume was in the Uploading state, present on the remote backend, and of the right size it would get changed to Uploaded.
One of the first things UploadSyntheticFilelist does is throw an exception if the volume is not in the Uploaded state. Or if it is in the Uploaded state, the next check would prevent a synthetic filelist from being created if the volume was not in the Uploading or Temporary states.

Removed the check for the volume not being in the Uploaded state as the warning in the second check handles that case.

Removed the using statement as it would dispose of the FilesetVolumeWriter after passing it to the UploadChannel. The UploadChannel could not use it since it had been disposed.

Fixed the GetRemoteVolumeFromIDAsync taking a fileset id and matching it up against a volume id. Now it will use fileset id to get the volume that matches the fileset.

Change the StopNow disruption test to not use a synthetic file list. The test was written with it not working and therefore fails a check on the number of filesets after stopping a backup.

Bonus fix for a possible null exception in Dispose for VolumeWriterBase.
2020-02-23 16:50:36 -06:00
Kenneth Hsu f63e703a66 Add test for interrupting backup with "stop now". 2020-01-06 10:00:35 -08:00
warwickmmandGitHub 1663148479 Merge pull request #4034 from warwickmm/test/no_local_db_list
Add test for listing filesets without local database
2020-01-06 09:20:40 -08:00
Kenneth Hsu d3bcd3fb4a Add test for listing filesets without local database.
This test would have failed prior to the changes in revision 8ab64071f0
("Display correct backup type when using direct restore").  Prior to
revision 8ab64071f0, all filesets would have been marked as partial when
performing a direct restore without the local database.

This concerns issue #3982.
2019-12-30 16:35:41 -08:00
Kenneth Hsu 7494abec63 Add test to verify that fileset file exists after repair.
This test would have failed prior to the changes in revision 0cfce6be39
("Include fileset file when repairing missing dlist file").

This concerns issue #3982.
2019-12-30 15:15:15 -08:00
Kenneth Hsu d3f752279f Add test to verify that fileset file exists after purge.
This test would have failed prior to the changes in revision 51b4ecfb28
("Include fileset file in dlist files after purge operation").

This concerns issue #3982.
2019-12-30 15:15:15 -08:00
Kenneth Hsu 7746ff1014 Fix derivation of seconds from TimeSpan.
Although the TimeSpan should be less than one minute, we should still
reference TotalSeconds to be safe.
2019-12-03 18:23:24 -08:00
Kenneth Hsu 30fddd4b91 Add test for retention-policy logic. 2019-11-29 22:18:02 -08:00
Kenneth Hsu 68e7844dae Add test for keep-versions logic where last backup was full.
This concerns issue #3982.
2019-11-29 14:13:15 -08:00
Kenneth Hsu 07df3d4d5e Verify backup times in addition to partial/full status. 2019-11-29 09:14:35 -08:00
Kenneth Hsu b0224194de Allow continutation after await to run in any context. 2019-11-29 09:12:15 -08:00
Kenneth Hsu 8c9512ac2c Add test for keep-versions retention logic. 2019-11-29 09:11:18 -08:00
Kenneth Hsu afecf891da Add test for keep-time retention logic.
We had to remove the keep-versions options since multiple retention
options are not allowed.

This concerns issue #3982.
2019-11-28 21:50:16 -08:00
Kenneth Hsu 9eedf757cd Extract creation of partial backup to helper method. 2019-11-28 21:47:54 -08:00
Kenneth Hsu 1d42c53319 Fix disruption test to expect partial backups in fileset listing.
This concerns issue #3982.
2019-11-19 19:30:03 -08:00
Kenneth Hsu bedecdef1d Allow execution to continue on any thread. 2019-09-17 14:16:58 -07:00
Kenneth Hsu a9ace40723 Increase dblock size to speed up testing. 2019-09-17 12:46:23 -07:00
Kenneth Hsu 2f58de4021 Remove unused using directive. 2019-09-17 12:46:23 -07:00
Kenneth Hsu e9e87a495c Disable warning. 2019-09-17 12:46:23 -07:00
Kenneth Hsu ca5a135300 Avoid checking metadata in restore tests.
There appear to be some differences at the tick level.
2019-09-17 12:46:23 -07:00
Kenneth Hsu add8b13c11 Verify restore of full fileset. 2019-09-17 12:46:23 -07:00
Kenneth Hsu 9fd3795032 Verify that at least one file was backed up in partial fileset. 2019-09-17 12:46:23 -07:00
Kenneth Hsu 7dd37fb381 Filter folders from file list. 2019-09-17 12:46:23 -07:00
Kenneth Hsu 2d78a95d97 Extract file sizes to private field. 2019-09-17 12:46:23 -07:00
Kenneth Hsu 3b1b4d1e44 Test restoring from partial version. 2019-09-17 12:46:23 -07:00
Kenneth Hsu 5e9dd9a7b8 Expose BackupType to test classes. 2019-09-17 12:46:23 -07:00
Kenneth Hsu 929987c3f2 Verify backup types after recreating database. 2019-09-17 12:46:23 -07:00
Kenneth Hsu e81555effc Test full backup after interrupted backup. 2019-09-17 12:46:23 -07:00
Kenneth Hsu 507beea277 Add tests for stopping after current file. 2019-09-17 12:46:23 -07:00