-
Notifications
You must be signed in to change notification settings - Fork 36.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: replace 'regtest' leftovers by self.chain #18069
test: replace 'regtest' leftovers by self.chain #18069
Conversation
Commit 1abcecc replaced 'regtest' by self.chain 'regtest' "in almost all current tests", this commit takes care of the remaining ones.
eca56f8 test: replace 'regtest' leftovers by self.chain (Sebastian Falbesoner) Pull request description: This is a follow-up PR to #16681 (fixes #18068), replacing all remaining hardcoded `"regtest"` strings in functional tests by `self.chain`. Top commit has no ACKs. Tree-SHA512: 96524649b33164938e5a95215991103ed7855ebab55ef788d4816b3fa5cbc03d8f3b0d39f2247a87522f289fd7f4daf25e059900b8462b5127eb154bbee89054
@@ -25,7 +25,7 @@ def run_test(self): | |||
|
|||
FILENAME = 'txoutset.dat' | |||
out = node.dumptxoutset(FILENAME) | |||
expected_path = Path(node.datadir) / 'regtest' / FILENAME | |||
expected_path = Path(node.datadir) / self.chain / FILENAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rules out running on mainnet, which doesn't add a chain-named subdir (but I guess that's okay as this test would never be suitable for that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work fine for the main chain. Note that self.chain refers to the datadir name, see also #17556 (comment)
>>> pathlib.Path('/tmp/a') / '' / 'c'
PosixPath('/tmp/a/c')
ACK eca56f8 |
I think that would work even without chaning that line, but that line can
be changed too. I actually need yo vhange it in one of my currently open
prs.
But, anyway, it is better than it was, still ack.
…On Fri, Feb 7, 2020, 13:09 Sebastian Falbesoner ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In test/functional/feature_config_args.py
<#18069 (comment)>:
> @@ -93,8 +93,8 @@ def test_args_log(self):
'Command-line arg: rpcpassword=****',
'Command-line arg: rpcuser=****',
'Command-line arg: torpassword=****',
- 'Config file arg: regtest="1"',
- 'Config file arg: [regtest] server="1"',
+ 'Config file arg: %s="1"' % self.chain,
This wouldn't work, as the fundamental content of the config file is not
written by this test itself right now at this stage, but by the function
util.initialize_datadir() in the course of setting up the
BitcoinTestFramework, which uses the chainname=1 format:
https://github.com/bitcoin/bitcoin/blob/23fab1a3dfe6f308880197dbe2bd7ce70866f13c/test/functional/test_framework/util.py#L311-L313
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#18069?email_source=notifications&email_token=AAHWGSRWBP2STW4II7VNKDDRBVMOZA5CNFSM4KQEHNJKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUVQ26Y#discussion_r376380643>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHWGSSEYA3AWPLADAPLTGDRBVMOZANCNFSM4KQEHNJA>
.
|
Summary: This is a backport of Core [[bitcoin/bitcoin#16681 | PR16681]] and [[bitcoin/bitcoin#18069 | PR18069]] I also replaced one occurence of 'regtest' in test_framework.py, that was missed in the backport of [[bitcoin/bitcoin#16509 | PR16509]] (D5942) Test Plan: `ninja && ninja check-functional-extended` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D8738
This is a follow-up PR to #16681 (fixes #18068), replacing all remaining hardcoded
"regtest"
strings in functional tests byself.chain
.