summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Catch exceptions in individual tests and clean up nicely.Chris Wilson2014-12-26
| | | | | | This stops stale daemons from hanging around if a single test fails because it throws an exception, which otherwise would cause the whole suite to abort immediately without cleaning up after itself.
* Don't try to kill daemons at beginning of each deselected test.Chris Wilson2014-12-26
| | | | | This just results in huge console noise if we can't kill a daemon for some reason. Kill them once, after all tests have run, instead.
* Fix tar commands to work on OpenBSD.Chris Wilson2014-12-21
| | | | | BSD tar seems to not like additional options after the first block.
* Increase timing accuracy of client store marker test.Chris Wilson2014-12-21
| | | | | | Test now passes reliably with any verbosity level on NetBSD, despite the really slow compares.
* Fix test_changing_client_store_marker_pauses_daemon on NetBSD.Chris Wilson2014-12-15
| | | | | | Running a compare takes far too long on NetBSD (3 seconds) and this was messing up the timing of the test.
* Fix timing issue causing test_changing_client_store_marker_pauses_daemon to ↵Chris Wilson2014-12-10
| | | | | | | | fail. We didn't take into account the time taken to perform a compare as part of the test, when deciding how long to wait for bbackupd to recover.
* Add comment to explain why freshly extracted files should be backed up.Chris Wilson2014-12-10
| | | | Hopefully will help anyone trying to debug this test in future.
* Fix test_changing_client_store_marker_pauses_daemon failing randomly.Chris Wilson2014-12-06
| | | | | | | | | | | | | | The shorter delay on error, introduced recently to speed up test runs, combined with a guess about how long bbackupd would take to run a backup and discover that the client store marker had changed, meant that sometimes the daemon would have discovered the problem, aborted, waited and run again while the test was waiting for the first failure. Synchronising with the running daemon using bbackupctl wait_for_sync_end should make the test timing accurate enough. We also tighten the recovery timing checks to make sure that it's doing what it should.
* Don't start an independent daemon in test_bbackupd_exclusions.Chris Wilson2014-12-06
| | | | | We're using an internal daemon here, so we don't want an external one as well.
* Don't fail tests if running on a NetBSD system with no xattr support.Chris Wilson2014-12-06
|
* Workaround for old gnu tar, failing to restore timestamps on symlinks.Chris Wilson2014-12-06
| | | | | | | | | | | | | | | Older versions of GNU tar fail to set the timestamps on symlinks, which makes them appear too recent/new to be backed up immediately, causing test_bbackupd_uploads_files() for example to fail. Fixed by restoring the timestamps manually after extracting the fixture archive. For more details about the issue in tar, please see: http://lists.gnu.org/archive/html/bug-tar/2009-08/msg00007.html http://git.savannah.gnu.org/cgit/tar.git/plain/NEWS?id=release_1_24 This resulted in symlinks in fixture test files
* Add missing timeouts to reduce noise in testhttpserver.Chris Wilson2014-12-03
|
* Reduce wait in test_store_error_reporting from 100 seconds to 10.Chris Wilson2014-12-03
| | | | | | | | This makes the tests run ~300 seconds faster, and coincidentally somehow fixes or prevents a test failure on FreeBSD on this test, probably some race condition.
* Fix test failures in testbackupstorefix on FreeBSD 10.Chris Wilson2014-12-03
| | | | | | | It seems that sending a NULL pointer to an ostringstream on FreeBSD gives different results depending on the type of the pointer. It could write 0 or 0x0, and if they don't match, tests will fail.
* Fix test failures caused by reference count database changes.Chris Wilson2014-11-16
|
* Merge branch 'master' of /home/chris/projects/2004/boxi/bb-gitChris Wilson2014-10-31
|
* Repair the refcount database while checking accounts for errors.Chris Wilson2014-10-31
| | | | | | | Normally this will be done by housekeeping anyway, so it's not that useful, but it's good to check for it in tests, especially when testing BackupStoreCheck's ability to repair bad things that happened to the store when they involve references.
* Refactor handling of exceptions in protocol server command executors.Chris Wilson2014-10-31
| | | | | | | | | | Add a standard method to Replyable that will be called if a recoverable exception (a BoxException) occurs, and can return a protocol Message to be sent to the client, such as an error code for various standard errors, or rethrow the exception. If you want something different, catch exceptions and return the desired reply yourself, or you'll get the default handling.
* Delay daemon startup while it's not being used, for clarity.Chris Wilson2014-10-31
|
* Add a test that temporary and permanent refcount dbs are independentChris Wilson2014-10-31
| | | | | | Conflicts: test/backupstore/testbackupstore.cpp
* Whitespace, comment and readability fixesChris Wilson2014-10-31
|
* Refactor StartClient and StopClient out of testbbackupd.Chris Wilson2014-10-31
| | | | Use them in testbackupstorefix to reduce code duplication.
* Minor test fixes to testbbackupd.Chris Wilson2014-09-18
| | | | | Fix a couple of compiler warnings, and don't continue the test if we failed to load the configuration file.
* Fix inability to access locations starting with a slash.Chris Wilson2014-09-18
| | | | | | Thanks to Jean-Yves Moulin for reporting this issue. When bbackupd is configured to create locations whose names contain a slash, it was impossible to escape it, and thus to enter the directory in bbackupquery to inspect or restore it.
* Whitespace fixesChris Wilson2014-09-18
|
* Add test for disappearing directory causing attempt to upload an empty stream.Chris Wilson2014-09-18
| | | | | | | This caused the issue reported by Brendon Baumgartner and described in my email to the Box Backup list on Mon, 21 Apr 2014 at 18:44:38. If the directory disappears then we used to try to send an empty attributes block to the server, which is illegal.
* Move MockClientContext and MockBackupDaemon up in testbbackupd fileChris Wilson2014-09-18
|
* Add a function to compare a backup using a local protocolChris Wilson2014-09-18
|
* Whitespace fixesChris Wilson2014-09-18
|
* Major refactor of testbbackupd.Chris Wilson2014-09-04
| | | | | | | Split single monolithic test into many smaller ones, which can be run separately. Allows easier testing of new features in isolation. Merged back changes from the test refactor branch to reduce diffs.
* Add missing timeouts in StreamableMemBlock::Set and testbbackupd.Chris Wilson2014-09-04
| | | | | Reduces warnings about network operations with no timeout. May prevent some hangs that might have occurred waiting forever for network data in the past.
* Catch exceptions while executing store commands, and return an error message.Chris Wilson2014-09-04
| | | | | | | | | This will allow the client to eventually have more information about what went wrong on the server, if the server admin agrees, and makes test debugging easier. Backport some additional testbackupstore tests from the test refactor branch. Merged back changes from the test refactor branch to reduce diffs.
* Split test_multiple_uploads in two.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* More use of functions to simplify testbbackupd.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* Changed many uses of BackupProtocolClient to BackupProtocolCallable.Chris Wilson2014-09-04
| | | | | | Makes way for more use of local protocol objects and protocol subclasses. Merged back changes from the test refactor branch to reduce diffs.
* Define setup and teardown functions and macros, and use them.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* Simplify code with macros, update comments and fix whitespace.Chris Wilson2014-09-04
| | | | | | Hopefully all of these changes are inconsequential. Merged back changes from the test refactor branch to reduce diffs.
* Define some functions to reduce duplication in testbbackupd.Chris Wilson2014-09-04
| | | | | | | | | Merged back changes from the test refactor branch to reduce diffs. Fix wrong setting of log level in compare() function. We want to only show errors if we expect mismatches, and show warnings if we didn't expect mismatches. I had it the other way around before.
* Fix timing issue with bbackupd test for recovery after error.Chris Wilson2014-08-24
| | | | | | | For some reason the timing changed and the test was no longer waiting for the same length of time as bbackupd, causing it to fail. Merged back changes from the test refactor branch to reduce diffs.
* Fix tests broken by bbackupquery list recursive option change.Chris Wilson2014-08-17
|
* Improve commentChris Wilson2014-08-15
|
* Add missing network operation timeouts to test/basicserver.Chris Wilson2014-08-15
|
* Fix compile error caused by auto consume streams patch.Chris Wilson2014-08-15
|
* Add timeouts to network operations that are missing them.Chris Wilson2014-08-15
|
* Add missing timeouts for network operations.Chris Wilson2014-08-15
|
* Add a TEST_PROTOCOL_ERROR_OR assertion.Chris Wilson2014-08-15
| | | | | | | | Similar to TEST_COMMAND_RETURNS_ERROR_OR, but allows any command or sequence to cause the error, without direct access to the command message. Refactor so that TEST_COMMAND_RETURNS_ERROR_OR calls TEST_PROTOCOL_ERROR_OR to make the assertion on the last error seen by the protocol.
* Remove ServerException.h and the exception code aliases that it defines.Chris Wilson2014-08-15
| | | | We don't really need these, so clean up by removing them.
* Whitespace, wrapping, comments and dead code cleanups.Chris Wilson2014-08-15
| | | | | | | | Conflicts: bin/bbackupd/BackupDaemon.cpp bin/bbackupd/BackupDaemon.h test/bbackupd/testbbackupd.cpp
* Whitespace fixes.Chris Wilson2014-04-29
|
* Fix error when modifying a directory with missing entry in parent.Chris Wilson2014-04-29
| | | | This is hopefully the cause of the segfaults reported by Brendon Baumgartner.