test: Add prop224 directory cache unit tests

Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
This commit is contained in:
David Goulet
2016-08-10 16:40:06 -04:00
parent 025610612d
commit 1aeaba4906
6 changed files with 306 additions and 1 deletions
+4 -1
View File
@@ -6,6 +6,9 @@
* \brief Handle hidden service descriptor caches.
**/
/* For unit tests.*/
#define HS_CACHE_PRIVATE
#include "hs_cache.h"
#include "or.h"
@@ -178,7 +181,7 @@ err:
* <b>global_cutoff</b> value. If <b>global_cutoff</b> is 0, the cleaning
* process will use the lifetime found in the plaintext data section. Return
* the number of bytes cleaned. */
static size_t
STATIC size_t
cache_clean_v3_as_dir(time_t now, time_t global_cutoff)
{
size_t bytes_removed = 0;