mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-13 07:23:21 +02:00
037ea2c714walletdb: Remove m_mock from SQLiteDatabase (Ava Chow)59484e2fdbwallet: Make Mockable{Database,Batch} subclasses of SQLite classes (Ava Chow)b69f989dc5wallet, bench: Use TestingSetup in CoinSelection benchmark (Ava Chow)e7d67c9fd9test: Make duplicating MockableDatabases use cursor and batch (Ava Chow)964eafb71cbench, wallet: Make WalletMigration's setup WalletBatch scoped (Ava Chow) Pull request description: `MockableDatabase` was introduced for the tests to avoid tying non-database tests to a particular database type. However, since the only database type now is sqlite, and because the mockable behavior is no longer used by the tests, we can replace usage of the `MockabeDatabase` with a SQLite database that lives only in memory. This is particularly useful for future work that has the wallet make use of SQLite's capabilities more, which are less conducive to having a separate mock database implementation. ACKs for top commit: brunoerg: code review ACK037ea2c714sedited: Re-ACK037ea2c714furszy: Code review ACK037ea2c714Tree-SHA512: 0a99c27ef4e590966b3af929bf3acf99666861905aabf150fe5660ea07c881a49935a4e7dcd676dcd5e70616898d89d872b6e156ae9c600de1361c1b2469b64d
Test library
This contains files for the test library, which is used by the test binaries (unit tests, benchmarks, fuzzers, gui tests).
Generally, the files in this folder should be well-separated modules. New code should be added to existing modules or (when in doubt) a new module should be created.
The utilities in here are compiled into a library, which does not hold any state. However, the main file setup_common
defines the common test setup for all test binaries. The test binaries will handle the global state when they
instantiate the BasicTestingSetup (or one of its derived classes).