diff options
author | teor <teor@torproject.org> | 2019-10-21 14:18:54 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-10-21 14:21:41 +1000 |
commit | 4fde7699ee5975db55c418bc7011eaabc64d94c9 (patch) | |
tree | 58f661b3217cc4928c330a0b603559b5e7c15705 /src/test/test_controller.c | |
parent | 92fa5239fc357c2078bf613a875c986a3bd97710 (diff) | |
download | tor-4fde7699ee5975db55c418bc7011eaabc64d94c9.tar.gz tor-4fde7699ee5975db55c418bc7011eaabc64d94c9.zip |
test/getinfo: Remove unnecessary test code
Fix for 31684.
Diffstat (limited to 'src/test/test_controller.c')
-rw-r--r-- | src/test/test_controller.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/test/test_controller.c b/src/test/test_controller.c index d11b26e8d7..f5c927f620 100644 --- a/src/test/test_controller.c +++ b/src/test/test_controller.c @@ -1752,7 +1752,6 @@ test_getinfo_helper_current_consensus_from_file(void *arg) (void)arg; - setup_bridge_mocks(); MOCK(tor_mmap_file, mock_tor_mmap_file); MOCK(tor_munmap_file, mock_tor_munmap_file); @@ -1774,7 +1773,6 @@ test_getinfo_helper_current_consensus_from_file(void *arg) errmsg = NULL; done: - clear_bridge_mocks(); tor_free(answer); UNMOCK(tor_mmap_file); UNMOCK(tor_munmap_file); @@ -1791,9 +1789,7 @@ test_getinfo_helper_current_consensus_from_cache(void *arg) const char *errmsg = NULL; (void)arg; - setup_bridge_mocks(); or_options_t *options = get_options_mutable(); - int previous_fetch_value = options->FetchUselessDescriptors; options->FetchUselessDescriptors = 1; MOCK(dirserv_get_consensus, mock_dirserv_get_consensus); @@ -1817,10 +1813,9 @@ test_getinfo_helper_current_consensus_from_cache(void *arg) tor_free(mock_microdesc_consensus_cache->dir); tor_free(answer); errmsg = NULL; - options->FetchUselessDescriptors = previous_fetch_value; done: - clear_bridge_mocks(); + options->FetchUselessDescriptors = 0; tor_free(answer); tor_free(mock_microdesc_consensus_cache); UNMOCK(dirserv_get_consensus); |