[Tests] Tidy up REST interface functional tests #12766

pull romanz wants to merge 6 commits into bitcoin:master from romanz:tidy_up_rest_test changing 1 files +194 −248
  1. romanz commented at 12:23 pm on March 23, 2018: contributor
    Following the comment at #12717#pullrequestreview-106189117.
  2. fanquake added the label Tests on Mar 23, 2018
  3. romanz commented at 12:31 pm on March 23, 2018: contributor
    @jnewbery Please let me know what else could be improved in the tests :)
  4. romanz force-pushed on Mar 23, 2018
  5. fanquake requested review from jnewbery on Mar 26, 2018
  6. jnewbery commented at 3:16 pm on March 26, 2018: member
    Will review after #12717 is merged (feel free to ping me again once that happens!)
  7. laanwj commented at 7:38 pm on March 27, 2018: member

    Will review after #12717 is merged (feel free to ping me again once that happens!)

    It’s merged, please rebase (so that this is only test changes).

  8. romanz force-pushed on Mar 27, 2018
  9. romanz renamed this:
    [WIP] Tidy up REST interface functional tests
    [Tests] Tidy up REST interface functional tests
    on Mar 27, 2018
  10. romanz force-pushed on Apr 2, 2018
  11. romanz commented at 4:37 pm on April 2, 2018: contributor
    @jnewbery Ping :)
  12. in test/functional/interface_rest.py:283 in d54e3e7048 outdated
    518-        for tx in json_obj['tx']:
    519-            if not 'coinbase' in tx['vin'][0]: #exclude coinbase
    520-                assert_equal(tx['txid'] in txs, True)
    521+        # Check if the 3 tx show up in the new block
    522+        json_obj = self.test_rest_request("/block/{}".format(newblockhash[0]))
    523+        non_coinbase_txs = [tx['txid'] for tx in json_obj['tx']
    


    jnewbery commented at 5:58 pm on April 2, 2018:
    I’m not sure if ordering is guaranteed here. Perhaps construct sets and check for set equality?

    romanz commented at 8:44 am on April 3, 2018:
    Sounds good - done.
  13. jnewbery commented at 6:02 pm on April 2, 2018: member

    Tested ACK d54e3e704838eb39a5e6e33d8b530c6ed404fd49. One comment inline.

    Commits can probably be squashed a bit before merge. Feel free to take my changes without the commit messages if that makes things more structured.

  14. romanz force-pushed on Apr 3, 2018
  15. [tests] fix flake8 warnings in interface_rest.py test abf190e4e7
  16. [tests] improve logging and documentation in interface_rest.py 3fd4490db1
  17. [tests] Make json request building more consistent in interface_rest.py 7a3181a767
  18. [tests] refactor interface_rest.py to avoid code repetition
    Also refactor txout index parsing and formatting.
    ad00fbed3c
  19. [tests] only use 2 nodes in interface_rest.py ade5964e3f
  20. [tests] simplify binary and hex response parsing in interface_rest.py
    We use assert_greater_than_or_equal(), since the hex response contains
    an extra b'\n' traling byte.
    55efc1f62c
  21. romanz force-pushed on Apr 3, 2018
  22. romanz commented at 8:45 am on April 3, 2018: contributor

    Commits can probably be squashed a bit before merge.

    Squashed most of the small commits into a few large ones.

  23. jnewbery commented at 4:07 pm on April 3, 2018: member

    Tested ACK 55efc1f62cef7e19efcb58ba68fbc2053bfa19a0.

    Nicely structured PR. Very easy to review! Thanks

  24. laanwj commented at 2:09 pm on April 7, 2018: member
    utACK 55efc1f
  25. laanwj merged this on Apr 7, 2018
  26. laanwj closed this on Apr 7, 2018

  27. laanwj referenced this in commit 69310a342f on Apr 7, 2018
  28. romanz deleted the branch on Apr 8, 2018
  29. UdjinM6 referenced this in commit d69f704014 on May 21, 2021
  30. UdjinM6 referenced this in commit b1223b4925 on May 21, 2021
  31. UdjinM6 referenced this in commit 41a616e0cc on May 21, 2021
  32. UdjinM6 referenced this in commit 213e509f30 on May 22, 2021
  33. kittywhiskers referenced this in commit 64bbcbd405 on May 25, 2021
  34. 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: 2024-11-17 12:12 UTC

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