Test rpc_help.py failed: Check whether ZMQ is enabled or not. #14122

pull Kvaciral wants to merge 1 commits into bitcoin:master from Kvaciral:check_zmq_enabled changing 2 files +15 −4
  1. Kvaciral commented at 9:32 PM on August 31, 2018: contributor

    /test/functional/rpc_help.py checks for the zmq-category even while zmq may be disabled (in /test/config.ini) , I have added a check function to test_framework.py that can be used whether to determine to include zmq in a test or not.

  2. laanwj added the label Tests on Aug 31, 2018
  3. in test/functional/rpc_help.py:7 in 14e7176873 outdated
       3 | @@ -4,7 +4,7 @@
       4 |  # file COPYING or http://www.opensource.org/licenses/mit-license.php.
       5 |  """Test RPC help output."""
       6 |  
       7 | -from test_framework.test_framework import BitcoinTestFramework
       8 | +from test_framework.test_framework import (BitcoinTestFramework, is_zmq_enabled)
    


    promag commented at 10:45 PM on August 31, 2018:

    nit, drop ( )?


    Kvaciral commented at 11:26 PM on August 31, 2018:

    Oops, of course!!

  4. in test/functional/rpc_help.py:31 in 14e7176873 outdated
      24 | @@ -25,7 +25,13 @@ def run_test(self):
      25 |  
      26 |          # command titles
      27 |          titles = [line[3:-3] for line in node.help().splitlines() if line.startswith('==')]
      28 | -        assert_equal(titles, ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util', 'Wallet', 'Zmq'])
      29 | +
      30 | +        components = ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util', 'Wallet']
      31 | +
      32 | +        if is_zmq_enabled(self):
    


    promag commented at 10:50 PM on August 31, 2018:

    nit, my preference is

    if is_zmq_enabled(self):
        assert_equal(titles, ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util', 'Wallet', 'Zmq'])
    else:
        assert_equal(titles, ['Blockchain', 'Control', 'Generating', 'Mining', 'Network', 'Rawtransactions', 'Util', 'Wallet'])
    

    Kvaciral commented at 10:59 PM on August 31, 2018:

    I disagree, my code is more flexible..


    laanwj commented at 11:03 PM on August 31, 2018:

    there might be more optional categories in the future, which would result in a combination blow-up (say, if we ever make the functional tests run without wallet). I prefer adding them one by one as it is now.


    promag commented at 11:16 PM on August 31, 2018:

    Makes sense!

  5. promag commented at 10:52 PM on August 31, 2018: member

    Thanks @Kvaciral, this was on my TODO after @MarcoFalke #14020#pullrequestreview-150958484.

    utACK 14e7176, mind some nits.

  6. Test rpc_help.py failed: Check whether ZMQ is enabled or not. 8dfc2f30de
  7. laanwj commented at 6:19 AM on September 1, 2018: member

    ACK 8dfc2f30dea6bde0f74d23691377f248966011ab

  8. ken2812221 commented at 6:23 AM on September 1, 2018: contributor

    utACK 8dfc2f3

  9. laanwj merged this on Sep 1, 2018
  10. laanwj closed this on Sep 1, 2018

  11. laanwj referenced this in commit 2070a545e2 on Sep 1, 2018
  12. Kvaciral deleted the branch on Sep 1, 2018
  13. MarcoFalke referenced this in commit 286eab50ad on Oct 4, 2018
  14. MarcoFalke referenced this in commit 8bc1badada on Oct 25, 2018
  15. toxeus referenced this in commit d44ff3e75b on Nov 28, 2018
  16. PastaPastaPasta referenced this in commit 75abadbd88 on Jul 19, 2021
  17. PastaPastaPasta referenced this in commit 42e7ed79c6 on Jul 19, 2021
  18. PastaPastaPasta referenced this in commit c397d658e3 on Jul 19, 2021
  19. PastaPastaPasta referenced this in commit 0b76f1495a on Jul 19, 2021
  20. 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-28 06:15 UTC

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