The getdescriptorinfo RPC was added in #15368, this PR adds some tests.
qa: Add getdescriptorinfo functional test #15443
pull promag wants to merge 1 commits into bitcoin:master from promag:2019-02-qa-feature-descriptor changing 2 files +66 −0-
promag commented at 3:21 PM on February 19, 2019: member
-
in test/functional/test_runner.py:193 in 11778c8fd5 outdated
189 | @@ -190,6 +190,7 @@ 190 | 'rpc_help.py', 191 | 'feature_help.py', 192 | 'feature_shutdown.py', 193 | + 'feature_descriptor.py',
MarcoFalke commented at 3:25 PM on February 19, 2019:According to the naming guide, this should be rpc_descriptor?
promag commented at 3:30 PM on February 19, 2019:Descriptor is not a RPC thing is it?
Sjors commented at 4:22 PM on February 19, 2019:Or
rpc_getdescriptorinfo
MarcoFalke commented at 3:10 AM on March 10, 2020:@promag Are you going to rename this or not. If not I will merge as is.
promag commented at 8:14 AM on March 10, 2020:Renamed to rpc_getdescriptorinfo.py.
Sjors approvedSjors commented at 4:33 PM on February 19, 2019: membertACK 11778c on macOS 10.14.3.
We should distinguish two reasons for having test descriptors:
- To test the command output (make sure no fields are missing, all error RPC error conditions are covered)
- To test
descsum_createi.e. the Python implementation of descriptor checksums.
(2) probably deserves a seperate test that is called by
test_runnerbut otherwise doesn't need any of the framework. On the other hand, just adding it this test file seems fine too.It could be useful to put a bunch of test descriptors in a single JSON file to reuse between tests and to make it easier for other projects to borrow.
fanquake added the label Tests on Feb 19, 2019jonasschnelli commented at 5:55 AM on February 20, 2019: contributorMore tests are always good. Thanks for adding. Concept AcK
practicalswift commented at 7:18 PM on February 20, 2019: contributorConcept ACK
Thanks for adding!
DrahtBot commented at 1:16 AM on June 9, 2019: member<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
No conflicts as of last run.
jachiang commented at 11:39 AM on July 1, 2019: contributor@promag I looked into this PR in preparation for the PR Review Club IRC session later this week hosted by John and Harding and had a couple questions or thoughts:
I believe the RPC test does not cover a case where no checksum is appended to the output descriptor? Currently,EDIT: I realize the test covers descriptors with and without checksum.test_descwill append a checksum to every descriptor literal. Could we extendtest_descparameters to allow for such a test: e.g.def test_desc(self, desc, *appendchecksum*, isrange, issolvable, hasprivatekeys):It would seem that we could cover a case with
hasprivatekeys=Truee.g.wpkh(WIF)#checksumorwsh(multi(1, XPRV/1/0/*, XPUB/0/0/*))#checksumHow would aEDIT: Perhaps add addr(ADDR)/raw(HEX) inputs forissolvable=Falsereturn differ from anInvalid descriptorerror? I am sure there is a distinction which eludes me. In any case, would it make sense to cover an unsolvable descriptor?issolvable=Falsecoverage?
Thanks for adding this test.
meshcollider commented at 1:33 AM on January 17, 2020: contributorutACK 11778c8fd5cc13fcbcbc746ea1ca7ddef13a7de3
As mentioned above, it would be good to include some tests where
hasprivatekeys=TrueDrahtBot closed this on Mar 9, 2020DrahtBot commented at 8:34 PM on March 9, 2020: member<!--5d09a71f8925f3f132321140b44b946d-->The last travis run for this pull request was 384 days ago and is thus outdated. To trigger a fresh travis build, this pull request should be closed and re-opened.
DrahtBot reopened this on Mar 9, 2020promag force-pushed on Mar 10, 2020qa: Add getdescriptorinfo functional test cbf2d75d8fpromag force-pushed on Mar 10, 2020MarcoFalke merged this on Mar 10, 2020MarcoFalke closed this on Mar 10, 2020promag deleted the branch on Mar 10, 2020Fabcien referenced this in commit a34d598eb4 on Jan 6, 2021DrahtBot locked this on Feb 15, 2022
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 00:14 UTC
More mirrored repositories can be found on mirror.b10c.me