Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MacroFake
Tor
Commits
0485c7dd
Commit
0485c7dd
authored
4 years ago
by
David Goulet
Browse files
Options
Downloads
Patches
Plain Diff
tests: Fix unit tests after merge of #40237
parent
60da5d62
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/test_hs_cache.c
+6
-6
6 additions, 6 deletions
src/test/test_hs_cache.c
src/test/test_hs_client.c
+6
-6
6 additions, 6 deletions
src/test/test_hs_client.c
with
12 additions
and
12 deletions
src/test/test_hs_cache.c
+
6
−
6
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
[]
=
{
...
...
This diff is collapsed.
Click to expand it.
src/test/test_hs_client.c
+
6
−
6
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment