Nick Mathewson
bb38657b77
consdiffmgr test: add a test for updating ht on clean/rescan.
...
This brings us back up to ~94% coverage
2017-04-24 11:01:40 -04:00
Nick Mathewson
de0142cd9d
Expand diff-management test to cover reloading items from disk
2017-04-24 11:01:40 -04:00
Nick Mathewson
831e656baa
consdiffmgr tests: add tests to validate diff lookup/application
...
This commit adds some helper functions to look up the diff from one
consensus and to make sure that applying it leads to another. Then
we add them throughout the existing test cases. Doing this turned
up a reference-leaking bug in consensus_diff_worker_replyfn.
2017-04-24 11:01:40 -04:00
Nick Mathewson
605bcfbf71
consdiffmgr: Enable in-progress test that was not previously working
...
Also, add a list of additional tests to write.
2017-04-24 11:01:40 -04:00
Nick Mathewson
655f1c8e01
consdiffmgr: function to re-validate stored sha3 digests at startup
2017-04-24 11:00:28 -04:00
Nick Mathewson
5726fec9c2
Consdiffmgr test: Make sure that diffs are removable
...
A diff is removable as soon as it no longer takes you to the most
recent consensus of the appropriate flavor.
2017-04-24 10:59:25 -04:00
Nick Mathewson
35f6b678ab
Test the easiest cases of consdiffmgr_cleanup.
...
One more to go: deleting the old diffs.
2017-04-24 10:59:25 -04:00
Nick Mathewson
1fade37287
consdiffmgr non-test: check for initialization failure
...
Unfortunately, this test doesn't work, so I've left it
defined-out. There is currently no way in our unit tests to catch a
fatal assertion failure.
2017-04-24 10:59:25 -04:00
Nick Mathewson
d418f28cb5
consdiffmgr test: survive failures to compute a diff.
2017-04-24 10:59:25 -04:00
Nick Mathewson
b9c2f135bd
Another consdiffmgr test: only generate the diffs that are needed
...
This test makes sure that we only generate the diffs we actually
want, rather than regenerating all the diffs every time anything
changes.
2017-04-24 10:59:25 -04:00
Nick Mathewson
7fc37d41b4
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.
2017-04-24 10:59:25 -04:00