Commit 5d290088 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[1329] added a test case with a DB that doesn't have diffs table.

parent 3d59d6a2
......@@ -1099,4 +1099,17 @@ TEST_F(SQLite3Update, addDiffWithUpdate) {
checkDiffs(expected_stored, accessor->getRecordDiff(zone_id));
TEST_F(SQLite3Update, addDiffWithNoTable) {
// An attempt of adding diffs to an old version of database that doesn't
// have a diffs table. This will fail in preparing the statement.
initAccessor(SQLITE_DBFILE_EXAMPLE + ".nodiffs", "IN");
zone_id = accessor->startUpdateZone("", false).second;
copy(diff_begin_data, diff_begin_data + DatabaseAccessor::DIFF_PARAM_COUNT,
EXPECT_THROW(accessor->addRecordDiff(zone_id, getVersion(diff_begin_data),
} // end anonymous namespace
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment