lightning
lightning copied to clipboard
tests: add a "delete database" on the db fixture
a bunch of tests rely on being able to wipe the node database. we only run these on sqlite3 right now, it'd be great to make a generalized "wipe_db()" function on the db fixture in the tests so that we can run these tests seamlessly w/ any db backend.
e.g.
@unittest.skipIf(os.getenv('TEST_DB_PROVIDER', 'sqlite3') != 'sqlite3', "deletes database, which is assumed sqlite3")
def test_emergencyrecover(node_factory, bitcoind):
...
os.unlink(os.path.join(l1.daemon.lightning_dir, TEST_NETWORK, "lightningd.sqlite3"))