mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Unit tests for consdiffmgr module
Initial tests. These just try adding a few consensuses, looking them up, and making sure that consensus diffs are generated in a more or less reasonable-looking way. It's enough for 87% coverage, but it leaves out a lot of functionality.
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
* and serve the diffs from those documents to the latest consensus.
|
||||
*/
|
||||
|
||||
#define CONSDIFFMGR_PRIVATE
|
||||
|
||||
#include "or.h"
|
||||
#include "conscache.h"
|
||||
#include "consdiff.h"
|
||||
@@ -122,7 +124,7 @@ cdm_labels_prepend_sha3(config_line_t **labels,
|
||||
* <b>valid_after</b> time in the cache. Return that consensus if it's
|
||||
* present, or NULL if it's missing.
|
||||
*/
|
||||
static consensus_cache_entry_t *
|
||||
STATIC consensus_cache_entry_t *
|
||||
cdm_cache_lookup_consensus(consensus_flavor_t flavor, time_t valid_after)
|
||||
{
|
||||
char formatted_time[ISO_TIME_LEN+1];
|
||||
|
||||
Reference in New Issue
Block a user