aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_service.c
diff options
context:
space:
mode:
authorIsis Lovecruft <isis@torproject.org>2018-03-19 19:01:17 +0000
committerNick Mathewson <nickm@torproject.org>2018-03-19 16:59:07 -0400
commit66d3120634ad3daffc3394b05ad5f9ef9716c18a (patch)
treeb7cbe34726089e133a98a18438c43f1f124555bf /src/test/test_hs_service.c
parentbc0de600b2033c6fb109d70ff3cbd8b8dc2ad271 (diff)
downloadtor-66d3120634ad3daffc3394b05ad5f9ef9716c18a.tar.gz
tor-66d3120634ad3daffc3394b05ad5f9ef9716c18a.zip
tests: Fix HS test against max IP lifetime.
* FIXES part of #25450: https://bugs.torproject.org/25450
Diffstat (limited to 'src/test/test_hs_service.c')
-rw-r--r--src/test/test_hs_service.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index 4f5e8ba45f..d040f10e0c 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -419,8 +419,10 @@ test_service_intro_point(void *arg)
* surprisingly slow... */
tt_u64_op(ip->time_to_expire, OP_GE,
now + INTRO_POINT_LIFETIME_MIN_SECONDS - 500);
+ /* We add 500 seconds, because this time we're testing against the
+ * maximum allowed time. */
tt_u64_op(ip->time_to_expire, OP_LE,
- now + INTRO_POINT_LIFETIME_MAX_SECONDS - 500);
+ now + INTRO_POINT_LIFETIME_MAX_SECONDS + 500);
tt_assert(ip->replay_cache);
tt_assert(ip->base.link_specifiers);
/* By default, this is NOT a legacy object. */