summaryrefslogtreecommitdiff
path: root/src/test/test_hs_service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_hs_service.c')
-rw-r--r--src/test/test_hs_service.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index c0dd9fe251..c93197ac20 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -1183,7 +1183,6 @@ test_upload_descriptors(void *arg)
int ret;
time_t now = time(NULL);
hs_service_t *service;
- hs_service_intro_point_t *ip;
(void) arg;
@@ -1191,7 +1190,6 @@ test_upload_descriptors(void *arg)
MOCK(hs_overlap_mode_is_active, mock_hs_overlap_mode_is_active_true);
MOCK(get_or_state,
get_or_state_replacement);
-
dummy_state = tor_malloc_zero(sizeof(or_state_t));
/* Create a service with no descriptor. It's added to the global map. */
@@ -1222,25 +1220,10 @@ test_upload_descriptors(void *arg)
/* If no upload happened, this should be untouched. */
tt_u64_op(service->desc_current->next_upload_time, OP_EQ, now + 1000);
- /* Set our upload time in the past so we trigger an upload. */
- service->desc_current->next_upload_time = now - 1000;
- service->desc_next->next_upload_time = now - 1000;
- ip = helper_create_service_ip();
- ip->circuit_established = 1;
- service_intro_point_add(service->desc_current->intro_points.map, ip);
-
- setup_full_capture_of_logs(LOG_WARN);
- run_upload_descriptor_event(now);
- expect_log_msg_containing("No valid consensus so we can't get the");
- teardown_capture_of_logs();
- tt_u64_op(service->desc_current->next_upload_time, OP_GE,
- now + HS_SERVICE_NEXT_UPLOAD_TIME_MIN);
- tt_u64_op(service->desc_current->next_upload_time, OP_LE,
- now + HS_SERVICE_NEXT_UPLOAD_TIME_MAX);
-
done:
hs_free_all();
UNMOCK(hs_overlap_mode_is_active);
+ UNMOCK(get_or_state);
}
/** Test the functions that save and load HS revision counters to state. */