| 412 | } |
| 413 | |
| 414 | static bool test_empty_db_migrate(struct lightningd *ld) |
| 415 | { |
| 416 | struct db *db = create_test_db(); |
| 417 | const struct ext_key *bip32_base = NULL; |
| 418 | CHECK(db); |
| 419 | db_begin_transaction(db); |
| 420 | CHECK(db_get_version(db) == -1); |
| 421 | db_migrate(ld, db, bip32_base); |
| 422 | db_commit_transaction(db); |
| 423 | |
| 424 | db_begin_transaction(db); |
| 425 | CHECK(db_get_version(db) == ARRAY_SIZE(dbmigrations) - 1); |
| 426 | db_commit_transaction(db); |
| 427 | |
| 428 | tal_free(db); |
| 429 | return true; |
| 430 | } |
| 431 | |
| 432 | static bool test_primitives(void) |
| 433 | { |
no test coverage detected