[Box Backup-commit] COMMIT r3412 - box/trunk/test/bbackupd

subversion at boxbackup.org subversion at boxbackup.org
Thu Sep 18 21:29:01 BST 2014


Author: chris
Date: 2014-09-18 21:29:01 +0100 (Thu, 18 Sep 2014)
New Revision: 3412

Modified:
   box/trunk/test/bbackupd/testbbackupd.cpp
Log:
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.

Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp	2014-09-18 20:28:58 UTC (rev 3411)
+++ box/trunk/test/bbackupd/testbbackupd.cpp	2014-09-18 20:29:01 UTC (rev 3412)
@@ -416,7 +416,7 @@
 	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 @@
 			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 @@
 				("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")));




More information about the Boxbackup-commit mailing list