mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-08 14:47:31 +02:00
qa: Remove all instances of remove_all except test cleanup
Adds a lint check for `remove_all()` `fs::remove_all()`/`std::filesystem::remove_all()` is extremely dangerous, all user-facing instances of it have been removed, and it also deserves to be removed from the places in our test code where it is being used unnecessarily.
This commit is contained in:
@@ -1175,8 +1175,8 @@ BOOST_AUTO_TEST_CASE(btck_chainman_regtest_tests)
|
||||
BOOST_CHECK_EQUAL(count, chain.CountEntries());
|
||||
|
||||
|
||||
fs::remove_all(test_directory.m_directory / "blocks" / "blk00000.dat");
|
||||
fs::remove(test_directory.m_directory / "blocks" / "blk00000.dat");
|
||||
BOOST_CHECK(!chainman->ReadBlock(tip_2).has_value());
|
||||
fs::remove_all(test_directory.m_directory / "blocks" / "rev00000.dat");
|
||||
fs::remove(test_directory.m_directory / "blocks" / "rev00000.dat");
|
||||
BOOST_CHECK_THROW(chainman->ReadBlockSpentOutputs(tip), std::runtime_error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user