diff options
author | teor <teor@torproject.org> | 2018-11-21 15:55:43 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2018-11-22 16:54:46 +1000 |
commit | cebc39bcd56dde8f9824055fcd54707de56ab9b1 (patch) | |
tree | c7de2c4b649ba7420e2cd9cf8cf56d852267bf00 /src/test | |
parent | 657618ba9bd96830b0a283c28db203bf9fffb15d (diff) | |
download | tor-cebc39bcd56dde8f9824055fcd54707de56ab9b1.tar.gz tor-cebc39bcd56dde8f9824055fcd54707de56ab9b1.zip |
Test: make unit tests use a reasonably live consensus
Cleanup after 24661.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_entrynodes.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c index b67c9fae53..3653feaff5 100644 --- a/src/test/test_entrynodes.c +++ b/src/test/test_entrynodes.c @@ -74,9 +74,10 @@ bfn_mock_nodelist_get_list(void) } static networkstatus_t * -bfn_mock_networkstatus_get_live_consensus(time_t now) +bfn_mock_networkstatus_get_reasonably_live_consensus(time_t now, int flavor) { (void)now; + (void)flavor; return dummy_consensus; } @@ -118,7 +119,7 @@ big_fake_network_cleanup(const struct testcase_t *testcase, void *ptr) UNMOCK(nodelist_get_list); UNMOCK(node_get_by_id); UNMOCK(get_or_state); - UNMOCK(networkstatus_get_live_consensus); + UNMOCK(networkstatus_get_reasonably_live_consensus); or_state_free(dummy_state); dummy_state = NULL; tor_free(dummy_consensus); @@ -198,8 +199,8 @@ big_fake_network_setup(const struct testcase_t *testcase) MOCK(node_get_by_id, bfn_mock_node_get_by_id); MOCK(get_or_state, get_or_state_replacement); - MOCK(networkstatus_get_live_consensus, - bfn_mock_networkstatus_get_live_consensus); + MOCK(networkstatus_get_reasonably_live_consensus, + bfn_mock_networkstatus_get_reasonably_live_consensus); /* Return anything but NULL (it's interpreted as test fail) */ return (void*)testcase; } |