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:
kevkevin
2023-07-27 23:32:20 -05:00
parent 78a983f597
commit 380130d9d7
2 changed files with 25 additions and 3 deletions

View File

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