qa: Add test to ensure node can generate all rpc help texts at runtime #14658

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1811-qaRpcHelpMan changing 1 files +15 −0
  1. MarcoFalke commented at 2:54 PM on November 5, 2018: member

    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)

  2. MarcoFalke added the label Tests on Nov 5, 2018
  3. MarcoFalke renamed this:
    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
    on Nov 5, 2018
  4. MarcoFalke added the label RPC/REST/ZMQ on Nov 5, 2018
  5. DrahtBot commented at 3:54 PM on November 5, 2018: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.<!--2502f1a698b3751726fa55edcda76cd3-->

    Coverage

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

    <sup>Updated at: 2018-11-05T19:01:46.454312.</sup>

  6. qa: Add test to ensure node can generate all help texts at runtime bbbbb3f885
  7. MarcoFalke force-pushed on Nov 5, 2018
  8. in test/functional/rpc_help.py:53 in bbbbb3f885
      48 | +        os.mkdir(dump_dir)
      49 | +        calls = [line.split(' ', 1)[0] for line in self.nodes[0].help().splitlines() if line and not line.startswith('==')]
      50 | +        for call in calls:
      51 | +            with open(os.path.join(dump_dir, call), 'w', encoding='utf-8') as f:
      52 | +                # Make sure the node can generate the help at runtime without crashing
      53 | +                f.write(self.nodes[0].help(call))
    


    promag commented at 4:47 PM on November 5, 2018:

    Why write to file?


    MarcoFalke commented at 5:44 PM on November 5, 2018:

    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...


    promag commented at 10:24 AM on November 6, 2018:

    @MarcoFalke thanks, all good points.

  9. promag commented at 4:47 PM on November 5, 2018: member

    Concept ACK.

  10. promag commented at 10:24 AM on November 6, 2018: member

    utACK bbbbb3f.

  11. laanwj commented at 10:52 AM on November 6, 2018: member

    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 bbbbb3f8850907d413db4715c10ef6df055234f6

  12. laanwj merged this on Nov 6, 2018
  13. laanwj closed this on Nov 6, 2018

  14. laanwj referenced this in commit cdddd17780 on Nov 6, 2018
  15. karelbilek commented at 11:08 AM on November 6, 2018: contributor

    nice

  16. MarcoFalke deleted the branch on Nov 6, 2018
  17. MarcoFalke referenced this in commit 3862e16fac on Nov 19, 2018
  18. MarcoFalke referenced this in commit 60f7a97930 on Nov 28, 2018
  19. dartdart26 referenced this in commit 46ddd665b4 on Nov 30, 2018
  20. deadalnix referenced this in commit 7cb92239e4 on Jun 24, 2020
  21. ftrader referenced this in commit ef5643ce51 on Aug 17, 2020
  22. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

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-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me