From: Adam Sampson Date: Sat, 23 Aug 2014 12:57:34 +0000 (+0100) Subject: Add a test for the maxage option to test-rawdog. X-Git-Tag: v2.20~4 X-Git-Url: http://git.ozo.com/?a=commitdiff_plain;h=296753aa77bd0cfac2ee7ec1097e9c74d372dac2;p=rawdog%2F.git Add a test for the maxage option to test-rawdog. --- diff --git a/NEWS b/NEWS index f37fffa..f2021d1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +- rawdog 2.20 + +Add a test for the maxage option (suggested by joelmo). + - rawdog 2.19 Make test-rawdog not depend on having a host it can test connection diff --git a/test-rawdog b/test-rawdog index e7a813e..0e2ecd1 100755 --- a/test-rawdog +++ b/test-rawdog @@ -443,6 +443,19 @@ make_n () { make_range 1 "$@" } +# Make time.time() return a fixed value. +fake_time () { + # A test can use this more than once within the same second, so the + # .pyc's timestamp might not change. Ensure it gets deleted. + rm -f $statedir/plugins/fake_time.* + cat >$statedir/plugins/fake_time.py <