diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-10-31 22:09:28 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-10-31 22:09:28 +0000 |
commit | d95ae43d507af4f02749f1dd99500f3220253002 (patch) | |
tree | fd3191adbfe99c46c6952a663e210aefdc083239 /lib/backupstore/StoreTestUtils.h | |
parent | 487f1138b257b3083917a097e510a5577222b408 (diff) |
Refactor StartClient and StopClient out of testbbackupd.
Use them in testbackupstorefix to reduce code duplication.
Diffstat (limited to 'lib/backupstore/StoreTestUtils.h')
-rw-r--r-- | lib/backupstore/StoreTestUtils.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/backupstore/StoreTestUtils.h b/lib/backupstore/StoreTestUtils.h index 335021d3..0740b3ec 100644 --- a/lib/backupstore/StoreTestUtils.h +++ b/lib/backupstore/StoreTestUtils.h @@ -21,7 +21,7 @@ class TLSContext; extern std::vector<uint32_t> ExpectedRefCounts; //! Holds the PID of the currently running bbstored test server. -extern int bbstored_pid; +extern int bbstored_pid, bbackupd_pid; //! Sets up (cleans up) test environment at the start of every test. bool setUp(const char* function_name); @@ -80,6 +80,12 @@ bool StartServer(); //! Stops the currently running bbstored test server. bool StopServer(bool wait_for_process = false); +//! Starts the bbackupd client running, which must not already be running. +bool StartClient(const std::string& bbackupd_conf_file = "testfiles/bbackupd.conf"); + +//! Stops the currently running bbackupd client. +bool StopClient(bool wait_for_process = false); + //! Creates the standard test account, for example after delete_account(). bool create_account(int soft, int hard); |