diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-09-12 12:50:36 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-13 14:54:49 -0400 |
commit | 6b794c7ed0a86e5c8de03b3a82b2299758f9e017 (patch) | |
tree | 08146e82a41eabc02bc23efefc322ca9436689fd /src/test/hs_test_helpers.c | |
parent | cf8a2b156769023e583b6c6374ac6de0134712f1 (diff) | |
download | tor-6b794c7ed0a86e5c8de03b3a82b2299758f9e017.tar.gz tor-6b794c7ed0a86e5c8de03b3a82b2299758f9e017.zip |
prop224 test: Test client desc expiration in tests.
We enrich the test_client_cache() test in two ways:
a) We check that transitioning time periods also cleans up expired
descriptors in client memory.
b) We test hs_cache_lookup_as_client() instead of
lookup_v3_desc_as_client(). The former is a higher level function
which calls the latter and allows us to test deeper into the
subsystem.
Diffstat (limited to 'src/test/hs_test_helpers.c')
-rw-r--r-- | src/test/hs_test_helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/hs_test_helpers.c b/src/test/hs_test_helpers.c index 2753d29078..cab73196b9 100644 --- a/src/test/hs_test_helpers.c +++ b/src/test/hs_test_helpers.c @@ -104,7 +104,7 @@ hs_helper_build_hs_desc_impl(unsigned int no_ip, memcpy(&desc->plaintext_data.signing_pubkey, &signing_kp->pubkey, sizeof(ed25519_public_key_t)); - uint64_t current_time_period = hs_get_time_period_num(approx_time()); + uint64_t current_time_period = hs_get_time_period_num(0); hs_build_blinded_keypair(signing_kp, NULL, 0, current_time_period, &blinded_kp); /* Copy only the public key into the descriptor. */ |