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
test: remove duplicated ban test #29688
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
b31893b
to
9cbfb82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work taking a more holistic view of test coverage (avoiding duplicates).
Inline comments provided. In a nutshell, unless it's covered elsewhere (and I'm missing something), I would recommend keeping lines focused on testing banning/unbanning onion addresses. Looks like the removal of restarting/checking lines can be done while keeping onion address banning/unbanning/checking.
This would prevent the preceding lines from false advertising:
bitcoin/test/functional/rpc_setban.py
Lines 56 to 61 in 9cbfb82
self.log.info("Test that a non-IP address can be banned/unbanned") | |
node = self.nodes[1] | |
tor_addr = "pg6mmjiyjmcrsslvykfwnntlaru7p5svn6y2ymmju6nubxndf4pscryd.onion" | |
ip_addr = "1.2.3.4" | |
assert not self.is_banned(node, tor_addr) | |
assert not self.is_banned(node, ip_addr) |
9cbfb82
to
605b1a8
Compare
Thanks, @tdb3 for reviewing it. Just changed it to keep the ban/unban of an onion addresses and moved the test persistence across node restart to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulled, built, and ran all unit and functional tests (all passed).
Updated comments for new commit 605b1a8.
605b1a8
to
590a52e
Compare
Force-pushed addressing #29688 (comment) and #29688 (comment) |
590a52e
to
7cdef4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline comment left for 7cdef4b.
Pulled and re-ran p2p_disconnect_ban
(passed).
Test the ban list is preserved through restart has been done by both `rpc_setban` and `p2p_disconnect_ban`. Since `p2p_disconnect_ban` does it in a more elegant way, we can keep only it and remove the duplicated one.
7cdef4b
to
e30e862
Compare
Force-pushed addressing #29688 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK for e30e862.
Comments addressed. Pulled latest commit and ran p2p_disconnect_ban
(v1 and v2 variants). Passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested ACK e30e862
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK e30e862
Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK e30e862
It seems like these two tests primarily revolve around the |
See #26863. Closed due to lack of interest. |
ACK e30e862 |
Test the ban list is preserved through restart has been done by both
rpc_setban
andp2p_disconnect_ban
. Sincep2p_disconnect_ban
does it in a more elegant way, we can keep only it and remove the other one.bitcoin/test/functional/p2p_disconnect_ban.py
Lines 74 to 110 in bf1b638