Fix check_csync_update
authorOlivier Goffart <ogoffart@woboq.com>
Mon, 3 Jul 2017 15:24:56 +0000 (17:24 +0200)
committerOlivier Goffart <ogoffart@woboq.com>
Mon, 3 Jul 2017 15:26:29 +0000 (17:26 +0200)
Commit 816096311027bac0f391ea97d0b61b4175e9b8f9 changed the
SQL requests from csync to read from the checksumtype table.
So we need to add this table in the fake DB as well

csync/tests/csync_tests/check_csync_update.c

index 6bd731947c0ee303acfb78f924e5304bff2cf1af..695616b2ca71a41ad7542faf8b6a8d9530d2e722 100644 (file)
@@ -52,6 +52,13 @@ static void statedb_create_metadata_table(sqlite3 *db)
         rc = sqlite3_exec(db, sql, NULL, NULL, NULL);
         //const char *msg = sqlite3_errmsg(db);
         assert_int_equal( rc, SQLITE_OK );
+
+        sql = "CREATE TABLE IF NOT EXISTS checksumtype("
+                        "id INTEGER PRIMARY KEY,"
+                        "name TEXT UNIQUE"
+                        ");";
+        rc = sqlite3_exec(db, sql, NULL, NULL, NULL);
+        assert_int_equal( rc, SQLITE_OK );
     }
 }