summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@moving-castle.wangafu.net>2017-03-23 10:44:43 +0100
committerNick Mathewson <nickm@moving-castle.wangafu.net>2017-03-23 10:44:43 +0100
commit4f6025498dde54761967d00801616f33cf69f71c (patch)
tree7a7e5d4617850920a92c818ba8b4d4d9684ea82e
parent567a56ae2e59aef26b31829f300c5700c7923f7b (diff)
downloadtor-4f6025498dde54761967d00801616f33cf69f71c.tar.gz
tor-4f6025498dde54761967d00801616f33cf69f71c.zip
Use update_approx_time() to run a test 100 days in the past.
Fixes bug21799.
-rw-r--r--changes/bug217996
-rw-r--r--src/test/test_entrynodes.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/changes/bug21799 b/changes/bug21799
new file mode 100644
index 0000000000..ee2e904a35
--- /dev/null
+++ b/changes/bug21799
@@ -0,0 +1,6 @@
+ o Minor bugfixes (tests):
+ - Run the entry_guard_parse_from_state_full test with the time set
+ to a specific date. (The guard state that this test was parsing
+ contained guards that had expired since the test was first
+ written.) Fixes bug 21799; bugfix on 0.3.0.1-alpha.
+
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index 249fd1f973..602aee9af3 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -584,6 +584,9 @@ test_entry_guard_parse_from_state_full(void *arg)
smartlist_t *text = smartlist_new();
char *joined = NULL;
+ // So nodes aren't expired
+ update_approx_time(1481621834);
+
MOCK(entry_guard_is_listed, mock_entry_guard_is_listed);
dummy_state = state;