Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Benjamin J. Thompson
Tor
Commits
0485c7dd
Commit
0485c7dd
authored
Jan 12, 2021
by
David Goulet
🤘
Browse files
tests: Fix unit tests after merge of #40237
parent
60da5d62
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/test/test_hs_cache.c
View file @
0485c7dd
...
...
@@ -587,8 +587,8 @@ test_client_cache_decrypt(void *arg)
/* Initialize HSDir cache subsystem */
hs_init
();
MOCK
(
networkstatus_get_live_consensus
,
mock_networkstatus_get_live_consensus
);
MOCK
(
networkstatus_get_
reasonably_
live_consensus
,
mock_networkstatus_get_
reasonably_
live_consensus
);
/* Set consensus time */
parse_rfc1123_time
(
"Sat, 26 Oct 1985 13:00:00 UTC"
,
...
...
@@ -643,7 +643,7 @@ test_client_cache_decrypt(void *arg)
hs_free_all
();
UNMOCK
(
networkstatus_get_live_consensus
);
UNMOCK
(
networkstatus_get_
reasonably_
live_consensus
);
}
static
void
...
...
@@ -657,8 +657,8 @@ test_client_cache_remove(void *arg)
hs_init
();
MOCK
(
networkstatus_get_live_consensus
,
mock_networkstatus_get_live_consensus
);
MOCK
(
networkstatus_get_
reasonably_
live_consensus
,
mock_networkstatus_get_
reasonably_
live_consensus
);
/* Set consensus time. Lookup will not return the entry if it has expired
* and it is checked against the consensus valid_after time. */
...
...
@@ -696,7 +696,7 @@ test_client_cache_remove(void *arg)
hs_descriptor_free
(
desc1
);
hs_free_all
();
UNMOCK
(
networkstatus_get_live_consensus
);
UNMOCK
(
networkstatus_get_
reasonably_
live_consensus
);
}
struct
testcase_t
hs_cache
[]
=
{
...
...
src/test/test_hs_client.c
View file @
0485c7dd
...
...
@@ -1121,8 +1121,8 @@ test_close_intro_circuits_cache_clean(void *arg)
/* This is needed because of the client cache expiration timestamp is based
* on having a consensus. See cached_client_descriptor_has_expired(). */
MOCK
(
networkstatus_get_live_consensus
,
mock_networkstatus_get_live_consensus
);
MOCK
(
networkstatus_get_
reasonably_
live_consensus
,
mock_networkstatus_get_
reasonably_
live_consensus
);
/* Set consensus time */
parse_rfc1123_time
(
"Sat, 26 Oct 1985 13:00:00 UTC"
,
...
...
@@ -1187,7 +1187,7 @@ test_close_intro_circuits_cache_clean(void *arg)
hs_descriptor_free
(
desc1
);
hs_free_all
();
rend_cache_free_all
();
UNMOCK
(
networkstatus_get_live_consensus
);
UNMOCK
(
networkstatus_get_
reasonably_
live_consensus
);
}
static
void
...
...
@@ -1204,8 +1204,8 @@ test_socks_hs_errors(void *arg)
(
void
)
arg
;
MOCK
(
networkstatus_get_live_consensus
,
mock_networkstatus_get_live_consensus
);
MOCK
(
networkstatus_get_
reasonably_
live_consensus
,
mock_networkstatus_get_
reasonably_
live_consensus
);
MOCK
(
connection_mark_unattached_ap_
,
mock_connection_mark_unattached_ap_no_close
);
MOCK
(
read_file_to_str
,
mock_read_file_to_str
);
...
...
@@ -1285,7 +1285,7 @@ test_socks_hs_errors(void *arg)
hs_free_all
();
UNMOCK
(
networkstatus_get_live_consensus
);
UNMOCK
(
networkstatus_get_
reasonably_
live_consensus
);
UNMOCK
(
connection_mark_unattached_ap_
);
UNMOCK
(
read_file_to_str
);
UNMOCK
(
tor_listdir
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment