mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
unit tests: don't crash if !HAVE_SQLITE3.
Fixes: #4928 Reported-by: @whitslack Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
0c3aa355db
commit
5cb4705eb4
@ -262,10 +262,13 @@ int main(int argc, char *argv[])
|
||||
common_setup(argv[0]);
|
||||
ld->config = test_config;
|
||||
|
||||
ok &= test_empty_db_migrate(ld);
|
||||
ok &= test_vars(ld);
|
||||
ok &= test_primitives();
|
||||
ok &= test_manip_columns();
|
||||
/* We do a runtime test here, so we still check compile! */
|
||||
if (HAVE_SQLITE3) {
|
||||
ok &= test_empty_db_migrate(ld);
|
||||
ok &= test_vars(ld);
|
||||
ok &= test_primitives();
|
||||
ok &= test_manip_columns();
|
||||
}
|
||||
|
||||
tal_free(ld);
|
||||
common_shutdown();
|
||||
|
@ -1906,15 +1906,18 @@ int main(int argc, const char *argv[])
|
||||
htlc_in_map_init(&ld->htlcs_in);
|
||||
htlc_out_map_init(&ld->htlcs_out);
|
||||
|
||||
ok &= test_shachain_crud(ld, tmpctx);
|
||||
ok &= test_channel_crud(ld, tmpctx);
|
||||
ok &= test_channel_inflight_crud(ld, tmpctx);
|
||||
ok &= test_channel_config_crud(ld, tmpctx);
|
||||
ok &= test_channel_inflight_crud(ld, tmpctx);
|
||||
ok &= test_wallet_outputs(ld, tmpctx);
|
||||
ok &= test_htlc_crud(ld, tmpctx);
|
||||
ok &= test_payment_crud(ld, tmpctx);
|
||||
ok &= test_wallet_payment_status_enum();
|
||||
/* We do a runtime test here, so we still check compile! */
|
||||
if (HAVE_SQLITE3) {
|
||||
ok &= test_shachain_crud(ld, tmpctx);
|
||||
ok &= test_channel_crud(ld, tmpctx);
|
||||
ok &= test_channel_inflight_crud(ld, tmpctx);
|
||||
ok &= test_channel_config_crud(ld, tmpctx);
|
||||
ok &= test_channel_inflight_crud(ld, tmpctx);
|
||||
ok &= test_wallet_outputs(ld, tmpctx);
|
||||
ok &= test_htlc_crud(ld, tmpctx);
|
||||
ok &= test_payment_crud(ld, tmpctx);
|
||||
ok &= test_wallet_payment_status_enum();
|
||||
}
|
||||
|
||||
/* Do not clean up in the case of an error, we might want to debug the
|
||||
* database. */
|
||||
|
Loading…
Reference in New Issue
Block a user