]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use update_approx_time() to run a test 100 days in the past.
authorNick Mathewson <nickm@moving-castle.wangafu.net>
Thu, 23 Mar 2017 09:44:43 +0000 (10:44 +0100)
committerNick Mathewson <nickm@moving-castle.wangafu.net>
Thu, 23 Mar 2017 09:44:43 +0000 (10:44 +0100)
Fixes bug21799.

changes/bug21799 [new file with mode: 0644]
src/test/test_entrynodes.c

diff --git a/changes/bug21799 b/changes/bug21799
new file mode 100644 (file)
index 0000000..ee2e904
--- /dev/null
@@ -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.
+
index 249fd1f9732973b0e2bc4cb6fad005a6ba5eadb2..602aee9af398e26bdaea09e8a3651813638c7613 100644 (file)
@@ -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;