mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03:00
test: Harden testing of cookie file existence
This commit is contained in:
parent
75bacabb55
commit
6e28c76907
1 changed files with 8 additions and 1 deletions
|
@ -166,8 +166,15 @@ class HTTPBasicsTest(BitcoinTestFramework):
|
|||
self.stop_node(0)
|
||||
|
||||
self.log.info('Check that failure to write cookie file will abort the node gracefully')
|
||||
(self.nodes[0].chain_path / ".cookie.tmp").mkdir()
|
||||
cookie_path = self.nodes[0].chain_path / ".cookie"
|
||||
cookie_path_tmp = self.nodes[0].chain_path / ".cookie.tmp"
|
||||
cookie_path_tmp.mkdir()
|
||||
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error)
|
||||
cookie_path_tmp.rmdir()
|
||||
assert not cookie_path.exists()
|
||||
self.restart_node(0)
|
||||
assert cookie_path.exists()
|
||||
self.stop_node(0)
|
||||
|
||||
self.test_rpccookieperms()
|
||||
|
||||
|
|
Loading…
Reference in a new issue