test: add coverage to feature_addrman.py

I added two new tests that will cover the nNew and nTried tests which
add coverage to the if block by checking values larger than our range
since we only check for negative values now

Co-authored-by: ismaelsadeeq <ask4ismailsadiq@gmail.com>
This commit is contained in:
kevkevinandismaelsadeeq committed 2023-10-01 22:43:49 -05:00
1 parent 78a983f597
commit 380130d9d7
2 files changed
+25 -3

No files matched your search

@@ -25,6 +25,11 @@ import os
STATE_LISTEN = '0A'
# STATE_CLOSING = '0B'
# Address manager size constants as defined in addrman_impl.h
ADDRMAN_NEW_BUCKET_COUNT = 1 << 10
ADDRMAN_TRIED_BUCKET_COUNT = 1 << 8
ADDRMAN_BUCKET_SIZE = 1 << 6
def get_socket_inodes(pid):
'''
Get list of socket inodes for process pid.