Skip to content
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

Merged

Conversation

theStack
Copy link
Contributor

@theStack theStack commented Feb 5, 2020

This is a follow-up PR to #16681 (fixes #18068), replacing all remaining hardcoded "regtest" strings in functional tests by self.chain.

Commit 1abcecc replaced 'regtest' by self.chain
'regtest' "in almost all current tests", this commit takes care of the remaining
ones.
@fanquake fanquake added the Tests label Feb 5, 2020
@fanquake fanquake requested a review from maflcko February 5, 2020 03:38
maflcko pushed a commit that referenced this pull request Feb 5, 2020
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
@maflcko maflcko merged commit eca56f8 into bitcoin:master Feb 5, 2020
@@ -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
Copy link
Member

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)

Copy link
Member

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')

@jtimon
Copy link
Contributor

jtimon commented Feb 7, 2020

ACK eca56f8

@jtimon
Copy link
Contributor

jtimon commented Feb 8, 2020 via email

@theStack theStack deleted the 20200205-test-replace-regtest-by-self_chain branch December 1, 2020 09:59
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 22, 2020
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Followups from #16681
5 participants