Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix 🙈
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Jul 3, 2023
1 parent 3ee3d1a commit 4d21b06
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/purge_chain_works.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ async fn purge_chain_rocksdb_works() {
kill(Pid::from_raw(cmd.id().try_into().unwrap()), SIGINT).unwrap();
// Wait for the node to handle it and exit.
assert!(common::wait_for(&mut cmd, 30).map(|x| x.success()).unwrap_or_default());
assert!(tmpdir.path().join("chains/polkadot-dev").exists());
assert!(tmpdir.path().join("chains/polkadot-dev/db/full").exists());
assert!(tmpdir.path().join("chains/polkadot-dev/db/full/parachains").exists());
assert!(tmpdir.path().join("chains/polkadot_dev").exists());
assert!(tmpdir.path().join("chains/polkadot_dev/db/full").exists());
assert!(tmpdir.path().join("chains/polkadot_dev/db/full/parachains").exists());

// Purge chain
let status = Command::new(cargo_bin("polkadot"))
Expand All @@ -69,8 +69,8 @@ async fn purge_chain_rocksdb_works() {
assert!(status.success());

// Make sure that the chain folder exists, but `db/full` is deleted.
assert!(tmpdir.path().join("chains/polkadot-dev").exists());
assert!(!tmpdir.path().join("chains/polkadot-dev/db/full").exists());
assert!(tmpdir.path().join("chains/polkadot_dev").exists());
assert!(!tmpdir.path().join("chains/polkadot_dev/db/full").exists());
}

#[tokio::test]
Expand Down Expand Up @@ -105,9 +105,9 @@ async fn purge_chain_paritydb_works() {
kill(Pid::from_raw(cmd.id().try_into().unwrap()), SIGINT).unwrap();
// Wait for the node to handle it and exit.
assert!(common::wait_for(&mut cmd, 30).map(|x| x.success()).unwrap_or_default());
assert!(tmpdir.path().join("chains/polkadot-dev").exists());
assert!(tmpdir.path().join("chains/polkadot-dev/paritydb/full").exists());
assert!(tmpdir.path().join("chains/polkadot-dev/paritydb/parachains").exists());
assert!(tmpdir.path().join("chains/polkadot_dev").exists());
assert!(tmpdir.path().join("chains/polkadot_dev/paritydb/full").exists());
assert!(tmpdir.path().join("chains/polkadot_dev/paritydb/parachains").exists());

// Purge chain
let status = Command::new(cargo_bin("polkadot"))
Expand All @@ -121,8 +121,8 @@ async fn purge_chain_paritydb_works() {
assert!(status.success());

// Make sure that the chain folder exists, but `db/full` is deleted.
assert!(tmpdir.path().join("chains/polkadot-dev").exists());
assert!(!tmpdir.path().join("chains/polkadot-dev/paritydb/full").exists());
assert!(tmpdir.path().join("chains/polkadot_dev").exists());
assert!(!tmpdir.path().join("chains/polkadot_dev/paritydb/full").exists());
// Parachains removal requires calling "purge-chain --parachains".
assert!(tmpdir.path().join("chains/polkadot-dev/paritydb/parachains").exists());
assert!(tmpdir.path().join("chains/polkadot_dev/paritydb/parachains").exists());
}

0 comments on commit 4d21b06

Please sign in to comment.