Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Nov 5, 2018

This might increase coverage, but more importantly this checks that the node doesn't crash when generating the help. (Right now the help is a static string, but in the future it might be generated at runtime)

@maflcko maflcko added the Tests label Nov 5, 2018
@maflcko maflcko changed the title qa: Add test to ensure node can generate all help texts at runtime qa: Add test to ensure node can generate all rpc help texts at runtime Nov 5, 2018
@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 5, 2018

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

Coverage

Coverage Change (pull 14658) Reference (master)
Lines -0.0022 % 87.0631 %
Functions +0.0000 % 84.2927 %
Branches -0.0075 % 51.5552 %

Updated at: 2018-11-05T19:01:46.454312.

@maflcko maflcko force-pushed the Mf1811-qaRpcHelpMan branch from faae854 to bbbbb3f Compare November 5, 2018 16:15
Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK.

for call in calls:
with open(os.path.join(dump_dir, call), 'w', encoding='utf-8') as f:
# Make sure the node can generate the help at runtime without crashing
f.write(self.nodes[0].help(call))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why write to file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no downside in logging the results to the temp dir. It'd make it easier to debug in case the node crashed while in the loop. Also, you could pass --nocleanup for manual inspection, etc...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarcoFalke thanks, all good points.

@promag
Copy link
Contributor

promag commented Nov 6, 2018

utACK bbbbb3f.

@laanwj
Copy link
Member

laanwj commented Nov 6, 2018

Good to have. A bug where generating the help crashes would not be critical but would be very embarrassing, good to check for that (especially as some help refactors are on the horizon).
utACK bbbbb3f

@laanwj laanwj merged commit bbbbb3f into bitcoin:master Nov 6, 2018
laanwj added a commit that referenced this pull request Nov 6, 2018
…exts at runtime

bbbbb3f qa: Add test to ensure node can generate all help texts at runtime (MarcoFalke)

Pull request description:

  This might increase coverage, but more importantly this checks that the node doesn't crash when generating the help. (Right now the help is a static string, but in the future it might be generated at runtime)

Tree-SHA512: 0226e7c65f8a1a6fdc96c07dcf491d90559bc2355c92e9da9b1f174b09733fc349269e71da6d792f954de563a1e57c848471813eabae1a40b849a0d989520a0d
@karelbilek
Copy link
Contributor

nice

@maflcko maflcko deleted the Mf1811-qaRpcHelpMan branch November 6, 2018 15:18
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Nov 28, 2018
dartdart26 added a commit to projectpai/paicoin that referenced this pull request Nov 30, 2018
qa: Add test to ensure node can generate all rpc help texts at runtime
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jun 24, 2020
…exts at runtime

Summary:
bbbbb3f8850907d413db4715c10ef6df055234f6 qa: Add test to ensure node can generate all help texts at runtime (MarcoFalke)

Pull request description:

  This might increase coverage, but more importantly this checks that the node doesn't crash when generating the help. (Right now the help is a static string, but in the future it might be generated at runtime)

Tree-SHA512: 0226e7c65f8a1a6fdc96c07dcf491d90559bc2355c92e9da9b1f174b09733fc349269e71da6d792f954de563a1e57c848471813eabae1a40b849a0d989520a0d

Backport of Core [[bitcoin/bitcoin#14658 | PR14658]]

Test Plan: `test_runner.py rpc_help`

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D6709
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Aug 17, 2020
…exts at runtime

Summary:
bbbbb3f8850907d413db4715c10ef6df055234f6 qa: Add test to ensure node can generate all help texts at runtime (MarcoFalke)

Pull request description:

  This might increase coverage, but more importantly this checks that the node doesn't crash when generating the help. (Right now the help is a static string, but in the future it might be generated at runtime)

Tree-SHA512: 0226e7c65f8a1a6fdc96c07dcf491d90559bc2355c92e9da9b1f174b09733fc349269e71da6d792f954de563a1e57c848471813eabae1a40b849a0d989520a0d

Backport of Core [[bitcoin/bitcoin#14658 | PR14658]]

Test Plan: `test_runner.py rpc_help`

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D6709
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants