test/dir: Update the tests for late vote rejection

Part of 4631.
This commit is contained in:
teor 2020-02-18 12:07:51 +10:00
parent acb5b0d535
commit 2b7eec7590
No known key found for this signature in database
GPG Key ID: 10FEAA0E7075672A

View File

@ -2084,8 +2084,8 @@ test_dir_handle_get_status_vote_d(void* data)
const char *msg_out = NULL; const char *msg_out = NULL;
int status_out = 0; int status_out = 0;
struct pending_vote_t *pv = dirvote_add_vote(VOTE_BODY_V3, &msg_out, struct pending_vote_t *pv = dirvote_add_vote(VOTE_BODY_V3, 0,
&status_out); &msg_out, &status_out);
tt_assert(pv); tt_assert(pv);
status_vote_current_d_test(&header, &body, &body_used); status_vote_current_d_test(&header, &body, &body_used);
@ -2459,8 +2459,8 @@ test_dir_handle_get_status_vote_next_authority(void* data)
time_t now = 1441223455 -1; time_t now = 1441223455 -1;
voting_schedule_recalculate_timing(mock_options, now); voting_schedule_recalculate_timing(mock_options, now);
struct pending_vote_t *vote = dirvote_add_vote(VOTE_BODY_V3, &msg_out, struct pending_vote_t *vote = dirvote_add_vote(VOTE_BODY_V3, 0,
&status_out); &msg_out, &status_out);
tt_assert(vote); tt_assert(vote);
MOCK(get_my_v3_authority_cert, get_my_v3_authority_cert_m); MOCK(get_my_v3_authority_cert, get_my_v3_authority_cert_m);
@ -2619,8 +2619,8 @@ test_dir_handle_get_status_vote_current_authority(void* data)
time_t now = 1441223455; time_t now = 1441223455;
voting_schedule_recalculate_timing(mock_options, now-1); voting_schedule_recalculate_timing(mock_options, now-1);
struct pending_vote_t *vote = dirvote_add_vote(VOTE_BODY_V3, &msg_out, struct pending_vote_t *vote = dirvote_add_vote(VOTE_BODY_V3, 0,
&status_out); &msg_out, &status_out);
tt_assert(vote); tt_assert(vote);
// move the pending vote to previous vote // move the pending vote to previous vote