path: root/test/bbackupd
Commit message (Collapse)AuthorAge
* Increase precision of timing on Windows.Chris Wilson2017-06-22
| | | | | | | Should hopefully reduce random failures of timing-dependent tests which rely on subsecond precision for accuracy. (cherry picked from commit c845b2e39fffeb560983a301d810616a6495469d)
* Relax timings on test_changing_client_store_marker_pauses_daemonChris Wilson2017-06-18
| | | | | | Also increase test verbosity to help debug the test if it fails again. (cherry picked from commit 00c2127e9832591c248fa6eea05dfaf785b8380d)
* Break dependency on Cygwin commands in Windows tests.Chris Wilson2016-09-03
| | | | | | Define WIN32 properly when building with CMake, and in this case, use native commands such as attrib.exe instead of Cygwin chmod, so that users don't have to install Cygwin or msys-git.
* Exclude one more symlink from untarring on Windows with 7za.Chris Wilson2015-12-26
* Fix keepalive test on Windows, which depends on number of files present.Chris Wilson2015-12-26
| | | | | On Windows there are no symlinks, so there should be 3 fewer files in the directory, and thus 6 fewer keepalives sent.
* Replace Unix-specific paths used by test/bbackupd with native paths.Chris Wilson2015-12-26
| | | | | Should fix some problems with running the perl scripts, causing test failures on Windows.
* Fix recursive directory deletion on Windows.Chris Wilson2015-12-24
* Replace shell implementation of test/bbackupd kill_running_daemons() with ↵Chris Wilson2015-12-24
| | | | | | pure C++. Allows it to work with Visual Studio and no Cygwin/MSYS shell.
* Use 7za to extract tgz files on Windows, as there's no (reliable) tar command.Chris Wilson2015-12-24
* Move reusable files from bin/bbstored to lib/bbstored.Chris Wilson2015-12-20
| | | | Break dependendency of test/bbackupd on individual files from other modules.
* Fix Windows file locking to work with MSVCChris Wilson2015-12-14
* Add CTest configurations to CMake. Make some tests work on Windows/MSVC.Chris Wilson2015-12-13
* Remove more references to unistd.h.Chris Wilson2015-12-10
* Remove all timing dependency from test_ssl_keepalives().Chris Wilson2015-09-20
| | | | | | | | This test has always been fragile, and usually fails on Travis for reasons unknown, so replace the log parsing and intercepts with simple mocking code. This doesn't cover 100% of what the old test did, including diff timer aborts and the number of blocks used by the uploaded files, but it should be completely robust.
* Rename global TLSContext variable to avoid conflicts.Chris Wilson2015-09-20
| | | | | "context" might easily be used in a test function, and doesn't follow our naming convention anyway, so renamed to sTlsContext.
* Fix random failures of testbbackup test_backup_pauses_when_store_is_full.Chris Wilson2015-08-07
| | | | | Stop the client while waiting for housekeeping, to ensure that it doesn't prevent housekeeping from running and cause the test to fail.
* Stop daemon on test setup, in case the previous test didn't.Chris Wilson2015-08-06
* Move load_config_file to Test.cpp to allow reuse.Chris Wilson2015-07-25
* Fix test_backup_pauses_when_store_is_full by waiting for housekeeping.Chris Wilson2015-07-18
| | | | | | It's not safe to assume that we can get into the store before housekeeping runs, so don't try. Just wait for housekeeping to run and check that all the files are deleted afterwards.
* Major test refactor to support test suites.Chris Wilson2015-07-01
| | | | | | | Refactor all common code from testbbackupd and testbackupstore to allow other test suites to contain multiple tests and execute selected tests more easily. Report all test results within a suite in a standard, easy to read summary.
* Compile fix for test/bbackupd after ClientException moveChris Wilson2015-06-28
* Ensure that errored tests are reported as failures, not successesChris Wilson2015-06-10
* Fix system exit codes from tests, so we can use them in the shell.Chris Wilson2015-05-04
| | | | | I needed reliable exit codes to run the tests in a loop to catch an intermittent failure.
* Fix test_ssl_keepalives to not depend on directory listing order.Chris Wilson2015-02-27
* Add test for hardlink handling.Chris Wilson2015-01-04
* Fix test failing on OpenBSD because tar -m behaves differently.Chris Wilson2015-01-02
* Fix more minor test breaks on WindowsChris Wilson2015-01-02
* Fix test to handle console encoding already in UTF-8.Chris Wilson2015-01-02
* Fix warning about assigning literal string constants to a char *Chris Wilson2014-12-26
* Fix test failures caused by connections left open on Windows.Chris Wilson2014-12-26
* Fix compile errors in tests on Windows.Chris Wilson2014-12-26
* Add comments about why some tests are skipped on Windows.Chris Wilson2014-12-26
* 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: This resulted in symlinks in fixture test files
* 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.
* 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.
* 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