Subject: | 10-leases-parse.t fails in non-UTC timezones |
10-leases-parse.t fails on non-UTC timezones:
t/10-leases-parse.......NOK 5/11
# Failed test 'lease->0 starts'
# at t/10-leases-parse.t line 27.
# got: '1215963752'
# expected: '1215970952'
# Failed test 'lease->0 ends'
# at t/10-leases-parse.t line 28.
# got: '1216050152'
# expected: '1216057352'
t/10-leases-parse.......NOK 6/11# 104: 0 wallclock secs ( 0.03 usr +
0.00 sys = 0.03 CPU) @ 32.00/s (n=1)
# Looks like you failed 2 tests of 11.
t/10-leases-parse.......dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 5-6
Failed 2/11 tests, 81.82% okay
patch:
--- 10-leases-parse.t.orig 2010-04-21 12:51:11.131276476 +0400
+++ 10-leases-parse.t 2010-04-21 12:52:26.996286135 +0400
@@ -25,8 +25,8 @@
$lease = $leases->leases->[0];
- is($lease->starts, timelocal(32,42,19,14,7-1,2008), "lease->0 starts");
- is($lease->ends, 1216057352, "lease->0 ends");
+ is($lease->starts, timelocal(32,42,19,13,7-1,2008), "lease->0 starts");
+ is($lease->ends, timelocal(32,42,19,14,7-1,2008), "lease->0 ends");
is($lease->state, "free", "lease->0 binding");
is($lease->hardware_address, "00:15:58:2f:83:bc", "lease->0
hw_ethernet");
is($lease->client_hostname, undef, "lease->0 hostname");