mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
This commit implements an itest kvdb -> SQL migration itest. The intention of the itest is to verify that the kvdb -> SQL migration flow works for a litd node which has data inserted to the bbolt database. To verify that, the minimum amount of data required to trigger the full migration flow is inserted into the bbolt database, which is one object to each database file. Those objects are: * One account - accounts.DB file * One session - session.db file * One action - rules.db file As the respective unit tests for each migration extensively tests that data of all forms for each database file can successfully be migrated, the itest only focuses on testing that the full migration flow works, and leaves the responsibility of data variation coverage to the respective unit test. The test is executed in different steps, and uses RPCs to seed and validate migration fixtures: 1. Start a node with a bbolt backend. 2. Insert one account, one session and one action via RPC. 3. Snapshot the inserted objects via RPC. 4. Restart with the configured SQL backend to trigger migration. 5. Query objects again via RPC. 6. Compare the new objects to the pre-migration snapshot. 7. Assert the migrated objects in SQL via direct queries, to verify that it's actually the SQL database that contains the migrated objects. |
||
|---|---|---|
| .. | ||
| assertions.go | ||
| litd_accounts_test.go | ||
| litd_firewall_test.go | ||
| litd_migration_test.go | ||
| litd_mode_integrated_test.go | ||
| litd_mode_remote_test.go | ||
| litd_node.go | ||
| litd_stateless_init_test.go | ||
| litd_test.go | ||
| litd_test_list_off_test.go | ||
| litd_test_list_on_test.go | ||
| log.go | ||
| network_harness.go | ||
| server_harness.go | ||
| test_harness.go | ||