0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-04 13:55:23 -05:00

refactor: introduce default pid file name constant in tests

This commit is contained in:
tdb3 2024-08-28 07:57:59 -04:00 committed by Sebastian Falbesoner
parent 33adc7521c
commit b832ffe044
2 changed files with 6 additions and 2 deletions

View file

@ -7,7 +7,10 @@ import random
import string
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_node import ErrorMatch
from test_framework.test_node import (
BITCOIN_PID_FILENAME_DEFAULT,
ErrorMatch,
)
class FilelockTest(BitcoinTestFramework):
def add_options(self, parser):
@ -33,7 +36,7 @@ class FilelockTest(BitcoinTestFramework):
self.log.info("Check that cookie and PID file are not deleted when attempting to start a second bitcoind using the same datadir")
cookie_file = datadir / ".cookie"
assert cookie_file.exists() # should not be deleted during the second bitcoind instance shutdown
pid_file = datadir / "bitcoind.pid"
pid_file = datadir / BITCOIN_PID_FILENAME_DEFAULT
assert pid_file.exists()
if self.is_wallet_compiled():

View file

@ -48,6 +48,7 @@ BITCOIND_PROC_WAIT_TIMEOUT = 60
NUM_XOR_BYTES = 8
# The null blocks key (all 0s)
NULL_BLK_XOR_KEY = bytes([0] * NUM_XOR_BYTES)
BITCOIN_PID_FILENAME_DEFAULT = "bitcoind.pid"
class FailedToStartError(Exception):