Store the database in a role specific subdirectory (#9645)

* Store the database in a role specific subdirectory

This is a cleaned up version of #8658 fixing #6880

polkadot companion: paritytech/polkadot#2923

* Disable prometheus in tests

* Also change p2p port

* Fix migration logic

* Use different identification file for rocks and parity db

Add tests for paritydb migration
This commit is contained in:
Falco Hirschenberger
2021-09-07 15:31:25 +02:00
committed by GitHub
parent 4849e34270
commit 16144e7404
12 changed files with 317 additions and 24 deletions
@@ -27,7 +27,7 @@ pub mod common;
fn purge_chain_works() {
let base_path = tempdir().expect("could not create a temp dir");
common::run_dev_node_for_a_while(base_path.path());
common::run_node_for_a_while(base_path.path(), &["--dev"]);
let status = Command::new(cargo_bin("substrate"))
.args(&["purge-chain", "--dev", "-d"])
@@ -39,5 +39,5 @@ fn purge_chain_works() {
// Make sure that the `dev` chain folder exists, but the `db` is deleted.
assert!(base_path.path().join("chains/dev/").exists());
assert!(!base_path.path().join("chains/dev/db").exists());
assert!(!base_path.path().join("chains/dev/db/full").exists());
}