Zebra/zebrad/tests/common
teor be5cfad07f
change(state): Prepare for in-place database format upgrades, but don't make any format changes yet (#7031)
* Move format upgrades to their own module and enum

* Launch a format change thread if needed, and shut it down during shutdown

* Add some TODOs and remove a redundant timer

* Regularly check for panics in the state upgrade task

* Only run example upgrade once, change version field names

* Increment database format to 25.0.2: add format change task

* Log the running and initial disk database format versions on startup

* Add initial disk and running state versions to cached state images in CI

* Fix missing imports

* Fix typo in logs workflow command

* Add a force_save_to_disk argument to the CI workflow

* Move use_internet_connection into zebrad_config()

* fastmod can_spawn_zebrad_for_rpc can_spawn_zebrad_for_test_type zebra*

* Add a spawn_zebrad_without_rpc() function

* Remove unused copy_state() test code

* Assert that upgrades and downgrades happen with the correct versions

* Add a kill_and_return_output() method for tests

* Add a test for new_state_format() versions (no upgrades or downgrades)

* Add use_internet_connection to can_spawn_zebrad_for_test_type()

* Fix workflow parameter passing

* Check that reopening a new database doesn't upgrade (or downgrade) the format

* Allow ephemeral to be set to false even if we don't have a cached state

* Add a test type that will accept any kind of state

* When re-using a directory, configure the state test config with that path

* Actually mark newly created databases with their format versions

* Wait for the state to be opened before testing the format

* Run state format tests on mainnet and testnet configs (no network access)

* run multiple reopens in tests

* Test upgrades run correctly

* Test that version downgrades work as expected (best effort)

* Add a TODO for testing partial updates

* Fix missing test arguments

* clippy if chain

* Fix typo

* another typo

* Pass a database instance to the format upgrade task

* Fix a timing issue in the tests

* Fix version matching in CI

* Use correct env var reference

* Use correct github env file

* Wait for the database to be written before killing Zebra

* Use correct workflow syntax

* Version changes aren't always upgrades

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-07-13 21:36:15 +00:00
..
configs change(network): Configurable maximum connections per IP (#7013) 2023-06-20 05:11:45 +00:00
get_block_template_rpcs change(state): Prepare for in-place database format upgrades, but don't make any format changes yet (#7031) 2023-07-13 21:36:15 +00:00
lightwalletd change(state): Prepare for in-place database format upgrades, but don't make any format changes yet (#7031) 2023-07-13 21:36:15 +00:00
cached_state.rs change(state): Prepare for in-place database format upgrades, but don't make any format changes yet (#7031) 2023-07-13 21:36:15 +00:00
check.rs T0. refactor(test): split zebrad acceptance tests into sub-modules (#3901) 2022-03-18 16:02:22 +00:00
checkpoints.rs cleanup(rust): Fix new nightly clippy warnings (#7135) 2023-07-05 07:11:27 +00:00
config.rs fix(tests): add submitblock test to CI, and avoid copying the cached state directory in other tests (#5589) 2022-11-10 03:40:21 +00:00
failure_messages.rs feat(zebrad): Refuse to run zebrad when release is too old (#6351) 2023-04-28 14:13:21 +00:00
get_block_template_rpcs.rs change(rpc): Add getpeerinfo RPC method (#5951) 2023-01-17 07:09:07 +00:00
launch.rs change(state): Prepare for in-place database format upgrades, but don't make any format changes yet (#7031) 2023-07-13 21:36:15 +00:00
lightwalletd.rs change(ci): Generate mainnet checkpoints in CI (#6550) 2023-04-27 04:39:43 +00:00
mod.rs change(ci): Generate mainnet checkpoints in CI (#6550) 2023-04-27 04:39:43 +00:00
sync.rs change(state): Prepare for in-place database format upgrades, but don't make any format changes yet (#7031) 2023-07-13 21:36:15 +00:00
test_type.rs change(state): Prepare for in-place database format upgrades, but don't make any format changes yet (#7031) 2023-07-13 21:36:15 +00:00