| 92 | } |
| 93 | |
| 94 | static bool test_empty_db_migrate(struct lightningd *ld) |
| 95 | { |
| 96 | struct db *db = create_test_db(); |
| 97 | const struct ext_key *bip32_base = NULL; |
| 98 | CHECK(db); |
| 99 | db_begin_transaction(db); |
| 100 | CHECK(db_get_version(db) == -1); |
| 101 | db_migrate(ld, db, bip32_base); |
| 102 | db_commit_transaction(db); |
| 103 | |
| 104 | db_begin_transaction(db); |
| 105 | CHECK(db_get_version(db) == ARRAY_SIZE(dbmigrations) - 1); |
| 106 | db_commit_transaction(db); |
| 107 | |
| 108 | tal_free(db); |
| 109 | return true; |
| 110 | } |
| 111 | |
| 112 | static bool test_primitives(void) |
| 113 | { |
no test coverage detected