summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-09-18 20:29:01 +0000
committerChris Wilson <chris+github@qwirx.com>2014-09-18 20:29:01 +0000
commit487f1138b257b3083917a097e510a5577222b408 (patch)
tree06e7694dac26ef2172f1d2fcc3b7f7e3b5cdbd34 /test
parentf244fb5f61f764ab2aff76b0b1b9d85e8ea1e751 (diff)
Minor test fixes to testbbackupd.
Fix a couple of compiler warnings, and don't continue the test if we failed to load the configuration file.
Diffstat (limited to 'test')
-rw-r--r--test/bbackupd/testbbackupd.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index 52ec9254..12080fb5 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -416,7 +416,7 @@ bool configure_bbackupd(BackupDaemon& bbackupd, const std::string& config_file)
MemoryBlockGuard<const char **> argv_buffer(sizeof(const char*) * (args.size() + 1));
const char **argv = argv_buffer;
argv_buffer[0] = "bbackupd";
- for (int i = 0; i < args.size(); i++)
+ for (size_t i = 0; i < args.size(); i++)
{
argv_buffer[i + 1] = args[i].c_str();
}
@@ -2184,9 +2184,6 @@ bool test_bbackupd_responds_to_connection_failure()
apClientContext = bbackupd.RunSyncNowWithExceptionHandling();
}
- TEST_THAT_OR(apClientContext.get(), FAIL);
- MockClientContext* pContext =
- static_cast<MockClientContext *>(apClientContext.get());
// Should only have been triggered once
TEST_EQUAL(1, client.hook.trigger_count);
TEST_THAT(TestFileExists("testfiles/notifyran.backup-error.1"));
@@ -2847,7 +2844,7 @@ bool test_store_error_reporting()
("testfiles/bbstored.conf", &BackupConfigFileVerify, errs));
TEST_EQUAL_LINE(0, errs.size(), "Loading configuration file "
"reported errors: " << errs);
- TEST_THAT(config.get() != 0);
+ TEST_THAT_OR(config.get(), return false);
std::auto_ptr<BackupStoreAccountDatabase> db(
BackupStoreAccountDatabase::Read(
config->GetKeyValue("AccountDatabase")));