Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] Tidy up REST interface functional tests #12766

Merged
merged 6 commits into from Apr 7, 2018

Conversation

romanz
Copy link
Contributor

@romanz romanz commented Mar 23, 2018

Following the comment at #12717 (review).

@fanquake fanquake added the Tests label Mar 23, 2018
@romanz
Copy link
Contributor Author

romanz commented Mar 23, 2018

@jnewbery Please let me know what else could be improved in the tests :)

@jnewbery
Copy link
Contributor

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

@laanwj
Copy link
Member

laanwj commented Mar 27, 2018

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

@romanz romanz changed the title [WIP] Tidy up REST interface functional tests [Tests] Tidy up REST interface functional tests Mar 27, 2018
@romanz
Copy link
Contributor Author

romanz commented Apr 2, 2018

@jnewbery Ping :)

Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

assert_equal(tx['txid'] in txs, True)
# Check if the 3 tx show up in the new block
json_obj = self.test_rest_request("/block/{}".format(newblockhash[0]))
non_coinbase_txs = [tx['txid'] for tx in json_obj['tx']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if ordering is guaranteed here. Perhaps construct sets and check for set equality?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good - done.

@romanz
Copy link
Contributor Author

romanz commented Apr 3, 2018

Commits can probably be squashed a bit before merge.

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

@jnewbery
Copy link
Contributor

jnewbery commented Apr 3, 2018

Tested ACK 55efc1f.

Nicely structured PR. Very easy to review! Thanks

@laanwj
Copy link
Member

laanwj commented Apr 7, 2018

utACK 55efc1f

@laanwj laanwj merged commit 55efc1f into bitcoin:master Apr 7, 2018
laanwj added a commit that referenced this pull request Apr 7, 2018
55efc1f [tests] simplify binary and hex response parsing in interface_rest.py (Roman Zeyde)
ade5964 [tests] only use 2 nodes in interface_rest.py (John Newbery)
ad00fbe [tests] refactor interface_rest.py to avoid code repetition (John Newbery)
7a3181a [tests] Make json request building more consistent in interface_rest.py (John Newbery)
3fd4490 [tests] improve logging and documentation in interface_rest.py (John Newbery)
abf190e [tests] fix flake8 warnings in interface_rest.py test (John Newbery)

Pull request description:

  Following the comment at #12717 (review).

Tree-SHA512: b55560f0d8f3069584f5a2398285483a0a23514b2b2bd2c1ced2db1cb30dc24f60f720d0fa4de30259f7918d3178d94680ae9321649544d1d04d687a2e672559
@romanz romanz deleted the tidy_up_rest_test branch April 8, 2018 14:22
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request May 21, 2021
55efc1f [tests] simplify binary and hex response parsing in interface_rest.py (Roman Zeyde)
ade5964 [tests] only use 2 nodes in interface_rest.py (John Newbery)
ad00fbe [tests] refactor interface_rest.py to avoid code repetition (John Newbery)
7a3181a [tests] Make json request building more consistent in interface_rest.py (John Newbery)
3fd4490 [tests] improve logging and documentation in interface_rest.py (John Newbery)
abf190e [tests] fix flake8 warnings in interface_rest.py test (John Newbery)

Pull request description:

  Following the comment at bitcoin#12717 (review).

Tree-SHA512: b55560f0d8f3069584f5a2398285483a0a23514b2b2bd2c1ced2db1cb30dc24f60f720d0fa4de30259f7918d3178d94680ae9321649544d1d04d687a2e672559
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request May 21, 2021
55efc1f [tests] simplify binary and hex response parsing in interface_rest.py (Roman Zeyde)
ade5964 [tests] only use 2 nodes in interface_rest.py (John Newbery)
ad00fbe [tests] refactor interface_rest.py to avoid code repetition (John Newbery)
7a3181a [tests] Make json request building more consistent in interface_rest.py (John Newbery)
3fd4490 [tests] improve logging and documentation in interface_rest.py (John Newbery)
abf190e [tests] fix flake8 warnings in interface_rest.py test (John Newbery)

Pull request description:

  Following the comment at bitcoin#12717 (review).

Tree-SHA512: b55560f0d8f3069584f5a2398285483a0a23514b2b2bd2c1ced2db1cb30dc24f60f720d0fa4de30259f7918d3178d94680ae9321649544d1d04d687a2e672559
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request May 21, 2021
55efc1f [tests] simplify binary and hex response parsing in interface_rest.py (Roman Zeyde)
ade5964 [tests] only use 2 nodes in interface_rest.py (John Newbery)
ad00fbe [tests] refactor interface_rest.py to avoid code repetition (John Newbery)
7a3181a [tests] Make json request building more consistent in interface_rest.py (John Newbery)
3fd4490 [tests] improve logging and documentation in interface_rest.py (John Newbery)
abf190e [tests] fix flake8 warnings in interface_rest.py test (John Newbery)

Pull request description:

  Following the comment at bitcoin#12717 (review).

Tree-SHA512: b55560f0d8f3069584f5a2398285483a0a23514b2b2bd2c1ced2db1cb30dc24f60f720d0fa4de30259f7918d3178d94680ae9321649544d1d04d687a2e672559
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request May 22, 2021
55efc1f [tests] simplify binary and hex response parsing in interface_rest.py (Roman Zeyde)
ade5964 [tests] only use 2 nodes in interface_rest.py (John Newbery)
ad00fbe [tests] refactor interface_rest.py to avoid code repetition (John Newbery)
7a3181a [tests] Make json request building more consistent in interface_rest.py (John Newbery)
3fd4490 [tests] improve logging and documentation in interface_rest.py (John Newbery)
abf190e [tests] fix flake8 warnings in interface_rest.py test (John Newbery)

Pull request description:

  Following the comment at bitcoin#12717 (review).

Tree-SHA512: b55560f0d8f3069584f5a2398285483a0a23514b2b2bd2c1ced2db1cb30dc24f60f720d0fa4de30259f7918d3178d94680ae9321649544d1d04d687a2e672559
kwvg pushed a commit to kwvg/dash that referenced this pull request May 25, 2021
55efc1f [tests] simplify binary and hex response parsing in interface_rest.py (Roman Zeyde)
ade5964 [tests] only use 2 nodes in interface_rest.py (John Newbery)
ad00fbe [tests] refactor interface_rest.py to avoid code repetition (John Newbery)
7a3181a [tests] Make json request building more consistent in interface_rest.py (John Newbery)
3fd4490 [tests] improve logging and documentation in interface_rest.py (John Newbery)
abf190e [tests] fix flake8 warnings in interface_rest.py test (John Newbery)

Pull request description:

  Following the comment at bitcoin#12717 (review).

Tree-SHA512: b55560f0d8f3069584f5a2398285483a0a23514b2b2bd2c1ced2db1cb30dc24f60f720d0fa4de30259f7918d3178d94680ae9321649544d1d04d687a2e672559
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants