Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
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
The Tor Project
Core
Tor
Commits
e2d3c9c5
Commit
e2d3c9c5
authored
4 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge branch 'ticket40187' into master
parents
b79694ca
f2168d28
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!202
Fake the current time when we're loading TEST_DESCRIPTORS.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug40187
+5
-0
5 additions, 0 deletions
changes/bug40187
src/test/test_helpers.c
+5
-0
5 additions, 0 deletions
src/test/test_helpers.c
with
10 additions
and
0 deletions
changes/bug40187
0 → 100644
+
5
−
0
View file @
e2d3c9c5
o Minor bugfixes (testing):
- Fix unit tests that used newly generated list of routers so that they
check them with respect to the date when they were generated, not
with respect to the current time. Fixes bug 40187; bugfix on
0.4.5.1-alpha.
This diff is collapsed.
Click to expand it.
src/test/test_helpers.c
+
5
−
0
View file @
e2d3c9c5
...
...
@@ -113,12 +113,17 @@ helper_setup_fake_routerlist(void)
MOCK
(
router_descriptor_is_older_than
,
router_descriptor_is_older_than_replacement
);
// Pick a time when these descriptors' certificates were valid.
update_approx_time
(
1603981036
);
/* Load all the test descriptors to the routerlist. */
retval
=
router_load_routers_from_string
(
TEST_DESCRIPTORS
,
NULL
,
SAVED_IN_JOURNAL
,
NULL
,
0
,
NULL
);
tt_int_op
(
retval
,
OP_EQ
,
HELPER_NUMBER_OF_DESCRIPTORS
);
update_approx_time
(
0
);
// this restores the regular approx_time behavior
/* Sanity checking of routerlist and nodelist. */
our_routerlist
=
router_get_routerlist
();
tt_int_op
(
smartlist_len
(
our_routerlist
->
routers
),
OP_EQ
,
...
...
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