[QA] restructure rpc tests directory #6097

pull jonasschnelli wants to merge 6 commits into bitcoin:master from jonasschnelli:2015/05/rpc_test_organizing changing 45 files +125 −124
  1. jonasschnelli commented at 11:26 AM on May 2, 2015: contributor
    • move non-test classes to subdir test-framework
    • added all test script into two sections to pull-tester/rpc-tests.sh
    • updated readme
  2. jonasschnelli force-pushed on May 2, 2015
  3. jonasschnelli force-pushed on May 2, 2015
  4. jonasschnelli force-pushed on May 2, 2015
  5. jonasschnelli force-pushed on May 2, 2015
  6. jonasschnelli force-pushed on May 2, 2015
  7. jonasschnelli force-pushed on May 2, 2015
  8. jonasschnelli force-pushed on May 2, 2015
  9. jonasschnelli force-pushed on May 2, 2015
  10. jonasschnelli force-pushed on May 2, 2015
  11. laanwj added the label Tests on May 4, 2015
  12. jonasschnelli force-pushed on May 6, 2015
  13. jonasschnelli commented at 12:36 PM on May 6, 2015: contributor

    rebased

  14. jonasschnelli force-pushed on May 7, 2015
  15. jonasschnelli commented at 8:26 PM on May 7, 2015: contributor

    Fixed travis issue. Rebased.

  16. jonasschnelli force-pushed on May 7, 2015
  17. jonasschnelli force-pushed on May 7, 2015
  18. sipa commented at 2:51 AM on May 8, 2015: member

    No opinion.

  19. jonasschnelli commented at 8:25 AM on May 8, 2015: contributor

    The benefits of this pull is not just another type of structure instead it's a clean distinction between test classes/files and utility classes/files. At the moment you can't distinguish between a runnable test and a utility class within the folder ./qa/rpc-tests. Since #5981 it's even more mixed up. It's hard to get a overview of all possible test we have (thats why i extended rpc-test.sh).

    Basically: it's a mess.

    IMO messy qa/test setups end up in messy tests and bad test coverage. Therefore it should be clean at the root. This simplifies the test setup and allow upcoming contributors to reduce the learn-curve of how a test should be written.

  20. sdaftuar commented at 6:41 PM on May 14, 2015: member

    Concept ACK. I agree that the rpc-tests directory is a bit messy, and I have found it difficult in the past to just find all the tests that I can run. Making rpc-tests.sh be a canonical place to put new scripts so others know to run them seems like a helpful thing which I plan to use.

    I don't have much opinion about how to best organize python code, but what you have done with the test_framework directory looks okay to me.

    One thing I noticed -- I think script_test.py should probably be commented out of the extended test scripts. Because it's just comparing behavior, it really doesn't make sense to run except with two different bitcoind binaries, which we don't have a way of doing in an automated way right now. If the test were to give an error, it would almost certainly mean that the test is itself broken, and it's extremely slow to run.

  21. gavinandresen commented at 6:46 PM on May 14, 2015: contributor

    concept ACK, tidier is better.

  22. theuni commented at 7:05 PM on May 14, 2015: member

    concept ACK, this was in need of some organization for sure.

  23. laanwj commented at 6:18 AM on May 18, 2015: member

    Concept ACK, I like moving the utility functions to a python package so that the top-level files are runnable scripts (needs rebase, though).

  24. [QA] restructure rpc tests directory
    * move non-test classes to subdir `test-framework`
    64937fe51a
  25. extend rpc-tests.sh control script with non-travis tests 344e08ed16
  26. update rpc-tests readme.md 00706a5436
  27. jonasschnelli force-pushed on May 18, 2015
  28. jonasschnelli force-pushed on May 18, 2015
  29. pull-tester/rpc-tests.sh: allow passing throug of arguments 3e875b1bef
  30. jonasschnelli force-pushed on May 18, 2015
  31. jonasschnelli commented at 1:31 PM on May 18, 2015: contributor

    Fixed @sdaftuar's nit (disabled script_test.py). Rebased.

  32. jonasschnelli force-pushed on May 19, 2015
  33. jonasschnelli force-pushed on May 19, 2015
  34. pull-tester/rpc-tests.sh: disable script_test.py test a85b2e221b
  35. jonasschnelli force-pushed on May 19, 2015
  36. laanwj commented at 9:08 AM on May 21, 2015: member

    It seems you forgot to update rpcbind_test.py for the new python-bitcoinrpc path.

    Speaking of which - let's move the bitcoinrpc directory directly into rpc-tests so that the Add python-bitcoinrpc to module search path hackery (in four places!) is no longer needed and we can just do:

    from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
    

    ... directly

  37. rpc-tests: remove python-bitcoinrpc directory
    place authproxy.py at same level as other utility classes
    7b7f258396
  38. jonasschnelli commented at 7:26 PM on May 21, 2015: contributor

    Totally agreed. I just remove the python-bitcoinrpc completely and placed the authproxy.py file directly into the new test-framework folder (it's not a submodule so it can be treated as normal utility class). Also fixed the rpcbind_test.py as mentioned by @laanwj

  39. laanwj merged this on May 27, 2015
  40. laanwj closed this on May 27, 2015

  41. laanwj referenced this in commit c608b6daf9 on May 27, 2015
  42. laanwj commented at 11:21 AM on May 27, 2015: member

    @jonasschnelli Nice solution

  43. laanwj referenced this in commit 3f16971442 on Jul 2, 2015
  44. 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-14 21:15 UTC

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