Commit cfe42490 authored by Mike Perry's avatar Mike Perry
Browse files

Fix broken test from routerset empty check.

parent 4249d038
Pipeline #6100 passed with stage
in 17 minutes and 32 seconds
...@@ -92,6 +92,12 @@ bfn_mock_node_get_by_id(const char *id) ...@@ -92,6 +92,12 @@ bfn_mock_node_get_by_id(const char *id)
return NULL; return NULL;
} }
static int
mock_router_have_minimum_dir_info(void)
{
return 1;
}
/* Helper function to free a test node. */ /* Helper function to free a test node. */
static void static void
test_node_free(node_t *n) test_node_free(node_t *n)
...@@ -3091,6 +3097,7 @@ static void ...@@ -3091,6 +3097,7 @@ static void
test_entry_guard_layer2_guards(void *arg) test_entry_guard_layer2_guards(void *arg)
{ {
(void) arg; (void) arg;
MOCK(router_have_minimum_dir_info, mock_router_have_minimum_dir_info);
/* Create the guardset */ /* Create the guardset */
maintain_layer2_guards(); maintain_layer2_guards();
...@@ -3100,7 +3107,7 @@ test_entry_guard_layer2_guards(void *arg) ...@@ -3100,7 +3107,7 @@ test_entry_guard_layer2_guards(void *arg)
tt_int_op(routerset_len(l2_guards), OP_EQ, 4); tt_int_op(routerset_len(l2_guards), OP_EQ, 4);
done: done:
; UNMOCK(router_have_minimum_dir_info);
} }
static const struct testcase_setup_t big_fake_network = { static const struct testcase_setup_t big_fake_network = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment