From 3ae592537d52deaf4e123c2469c42784b86a9d07 Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Mon, 15 Sep 2025 09:48:36 -0400 Subject: [PATCH] test: Prevent disk space warning during node_init_tests mzumsande pointed out https://github.com/bitcoin/bitcoin/pull/32345#issuecomment-3286964369 that this test was causing a warning: Warning: Disk space for "/tmp/test_common bitcoin/node_init_tests/init_test/bf78678cb7723a3e84b5/blocks" may not accommodate the block files. Approximately 810 GB of data will be stored in this directory. Fix by setting regtest instead of mainnet network before running the test. Github-Pull: #33391 Rebased-From: bdf01c6f61262cd6e211ead3c0dbc66ccb48b32f --- src/test/node_init_tests.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/node_init_tests.cpp b/src/test/node_init_tests.cpp index 802e3176099..90eab38f6f4 100644 --- a/src/test/node_init_tests.cpp +++ b/src/test/node_init_tests.cpp @@ -11,7 +11,12 @@ using node::NodeContext; -BOOST_FIXTURE_TEST_SUITE(node_init_tests, BasicTestingSetup) +//! Like BasicTestingSetup, but using regtest network instead of mainnet. +struct InitTestSetup : BasicTestingSetup { + InitTestSetup() : BasicTestingSetup{ChainType::REGTEST} {} +}; + +BOOST_FIXTURE_TEST_SUITE(node_init_tests, InitTestSetup) //! Custom implementation of interfaces::Init for testing. class TestInit : public interfaces::Init