summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-01-27 01:41:57 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-06-13 17:29:48 +0100
commit44534a13be68f91e3cbba250f9260a7ba8d6cd74 (patch)
treed9f4f95b1a3c1a39200d8e409036d1ad7d5fd157
parentMove record data into slice, switch data field to matching enumeration, incre... (diff)
downloadp2pvr-44534a13be68f91e3cbba250f9260a7ba8d6cd74.tar.bz2
p2pvr-44534a13be68f91e3cbba250f9260a7ba8d6cd74.tar.xz
p2pvr-44534a13be68f91e3cbba250f9260a7ba8d6cd74.zip
Offset test data into tomorrow to avoid results changing as day goes by
-rw-r--r--p2pvr/daemon/unittests/datasources/eventOffset.sql6
-rw-r--r--p2pvr/daemon/unittests/testSched.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/p2pvr/daemon/unittests/datasources/eventOffset.sql b/p2pvr/daemon/unittests/datasources/eventOffset.sql
index 3c796ca..132b504 100644
--- a/p2pvr/daemon/unittests/datasources/eventOffset.sql
+++ b/p2pvr/daemon/unittests/datasources/eventOffset.sql
@@ -1,8 +1,8 @@
--
--- This SQL will update events in the sample data to start today
+-- This SQL will update events in the sample data to start tomorrow (avoids things changing as day goes by)
--
UPDATE events SET
- starttime = starttime + (SELECT current_date - min(starttime) FROM events),
- stoptime = stoptime + (SELECT current_date - min(starttime) FROM events)
+ starttime = starttime + (SELECT current_date - min(starttime) FROM events) + '1 day'::interval,
+ stoptime = stoptime + (SELECT current_date - min(starttime) FROM events) + '1 day'::interval
diff --git a/p2pvr/daemon/unittests/testSched.cpp b/p2pvr/daemon/unittests/testSched.cpp
index 5293bfa..bfa8567 100644
--- a/p2pvr/daemon/unittests/testSched.cpp
+++ b/p2pvr/daemon/unittests/testSched.cpp
@@ -70,7 +70,7 @@ BOOST_AUTO_TEST_CASE( sc_doReschedule )
BOOST_AUTO_TEST_CASE( sc_getScheduled )
{
auto str = sc->GetScheduledToRecord();
- BOOST_REQUIRE_EQUAL(str.size(), 49);
+ BOOST_REQUIRE_EQUAL(str.size(), 62);
}
BOOST_AUTO_TEST_CASE( sc_crud )