summaryrefslogtreecommitdiff
path: root/p2pvr/daemon
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-09-26 01:13:51 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-09-26 01:13:51 +0100
commit3f290066324c5259586bdae113b5d58067d59faa (patch)
tree80cd79729ffe247c173653093e0ba060d3187022 /p2pvr/daemon
parentAdd a code coverage profile (diff)
downloadp2pvr-3f290066324c5259586bdae113b5d58067d59faa.tar.bz2
p2pvr-3f290066324c5259586bdae113b5d58067d59faa.tar.xz
p2pvr-3f290066324c5259586bdae113b5d58067d59faa.zip
Update to work with system dbpp
Diffstat (limited to 'p2pvr/daemon')
-rw-r--r--p2pvr/daemon/unittests/Jamfile.jam4
-rw-r--r--p2pvr/daemon/unittests/datasources/data.sql22
-rw-r--r--p2pvr/daemon/unittests/mockDefs.cpp6
-rw-r--r--p2pvr/daemon/unittests/mockDefs.h5
4 files changed, 18 insertions, 19 deletions
diff --git a/p2pvr/daemon/unittests/Jamfile.jam b/p2pvr/daemon/unittests/Jamfile.jam
index 2097b7a..86bb906 100644
--- a/p2pvr/daemon/unittests/Jamfile.jam
+++ b/p2pvr/daemon/unittests/Jamfile.jam
@@ -4,7 +4,7 @@ lib boost_system ;
lib boost_filesystem ;
lib IceUtil ;
lib Ice ;
-lib p2sqlmodPQ ;
+lib dbpp-postgresql : : : : <include>/usr/include/dbpp-postgresql ;
path-constant me : . ;
@@ -26,7 +26,7 @@ alias test-data :
lib testCommon :
mockDefs.cpp
:
- <library>p2sqlmodPQ
+ <library>dbpp-postgresql
<library>../..//p2sql
<library>../..//p2common
<library>../..//adhocutil
diff --git a/p2pvr/daemon/unittests/datasources/data.sql b/p2pvr/daemon/unittests/datasources/data.sql
index 3fd9260..5c91ecd 100644
--- a/p2pvr/daemon/unittests/datasources/data.sql
+++ b/p2pvr/daemon/unittests/datasources/data.sql
@@ -15,42 +15,42 @@ SET search_path = public, pg_catalog;
-- Data for Name: networks; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY networks (networkid, name) FROM '$P2MOCKSCRIPTDIR/networks';
+COPY networks (networkid, name) FROM '$SCRIPTDIR/networks';
--
-- Data for Name: transportstreams; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY transportstreams (transportstreamid, networkid, originalnetworkid) FROM '$P2MOCKSCRIPTDIR/transportstreams';
+COPY transportstreams (transportstreamid, networkid, originalnetworkid) FROM '$SCRIPTDIR/transportstreams';
--
-- Data for Name: delivery_dvbc; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY delivery_dvbc (frequency, transportstreamid, fecouter, modulation, symbolrate, fecinner) FROM '$P2MOCKSCRIPTDIR/delivery_dvbc';
+COPY delivery_dvbc (frequency, transportstreamid, fecouter, modulation, symbolrate, fecinner) FROM '$SCRIPTDIR/delivery_dvbc';
--
-- Data for Name: delivery_dvbs; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY delivery_dvbs (frequency, transportstreamid, orbitalposition, westeastflag, polarization, rolloff, modulationsystem, modulationtype, symbolrate, fecinner) FROM '$P2MOCKSCRIPTDIR/delivery_dvbs';
+COPY delivery_dvbs (frequency, transportstreamid, orbitalposition, westeastflag, polarization, rolloff, modulationsystem, modulationtype, symbolrate, fecinner) FROM '$SCRIPTDIR/delivery_dvbs';
--
-- Data for Name: delivery_dvbt; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY delivery_dvbt (frequency, transportstreamid, bandwidth, priority, timeslicing, mpefec, constellation, hierarchy, coderatehp, coderatelp, guardinterval, transmissionmode, otherfrequencyflag) FROM '$P2MOCKSCRIPTDIR/delivery_dvbt';
+COPY delivery_dvbt (frequency, transportstreamid, bandwidth, priority, timeslicing, mpefec, constellation, hierarchy, coderatehp, coderatelp, guardinterval, transmissionmode, otherfrequencyflag) FROM '$SCRIPTDIR/delivery_dvbt';
--
-- Data for Name: events; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY events (serviceid, eventid, title, titlelang, subtitle, description, descriptionlang, videoaspect, videoframerate, videohd, audiochannels, audiolanguage, subtitlelanguage, category, subcategory, usercategory, dvbrating, starttime, stoptime, episode, episodes, year, flags, season, eventuid, current) FROM '$P2MOCKSCRIPTDIR/events';
+COPY events (serviceid, eventid, title, titlelang, subtitle, description, descriptionlang, videoaspect, videoframerate, videohd, audiochannels, audiolanguage, subtitlelanguage, category, subcategory, usercategory, dvbrating, starttime, stoptime, episode, episodes, year, flags, season, eventuid, current) FROM '$SCRIPTDIR/events';
--
@@ -64,28 +64,28 @@ SELECT pg_catalog.setval('events_eventuid_seq', 2612705, true);
-- Data for Name: services; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY services (serviceid, name, providername, type, defaultauthority, runningstatus, eitschedule, eitpresentfollowing, freecamode, transportstreamid) FROM '$P2MOCKSCRIPTDIR/services';
+COPY services (serviceid, name, providername, type, defaultauthority, runningstatus, eitschedule, eitpresentfollowing, freecamode, transportstreamid) FROM '$SCRIPTDIR/services';
--
-- Data for Name: schedules; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY schedules (scheduleid, serviceid, eventuid, title, search, priority, early, late, repeats) FROM '$P2MOCKSCRIPTDIR/schedules';
+COPY schedules (scheduleid, serviceid, eventuid, title, search, priority, early, late, repeats) FROM '$SCRIPTDIR/schedules';
--
-- Data for Name: record; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY record (eventuid, recordstatus, scheduleid) FROM '$P2MOCKSCRIPTDIR/record';
+COPY record (eventuid, recordstatus, scheduleid) FROM '$SCRIPTDIR/record';
--
-- Data for Name: recorded; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY recorded (recordedid, scheduleid, eventuid) FROM '$P2MOCKSCRIPTDIR/recorded';
+COPY recorded (recordedid, scheduleid, eventuid) FROM '$SCRIPTDIR/recorded';
--
@@ -99,7 +99,7 @@ SELECT pg_catalog.setval('recorded_recordedid_seq', 1, false);
-- Data for Name: recordings; Type: TABLE DATA; Schema: public; Owner: p2pvr
--
-COPY recordings (recordingid, storageaddress, guid, scheduleid, eventuid) FROM '$P2MOCKSCRIPTDIR/recordings';
+COPY recordings (recordingid, storageaddress, guid, scheduleid, eventuid) FROM '$SCRIPTDIR/recordings';
--
diff --git a/p2pvr/daemon/unittests/mockDefs.cpp b/p2pvr/daemon/unittests/mockDefs.cpp
index 76abb80..8c44b9a 100644
--- a/p2pvr/daemon/unittests/mockDefs.cpp
+++ b/p2pvr/daemon/unittests/mockDefs.cpp
@@ -2,20 +2,20 @@
#include <definedDirs.h>
SchemaOnlyMockDatabase::SchemaOnlyMockDatabase() :
- MockPqDatabase("user=postgres dbname=postgres", "postgres", {
+ PQ::Mock("user=postgres dbname=postgres", "postgres", {
rootDir.parent_path().parent_path() / "datasources" / "schema.sql" })
{
}
StandardMockDatabase::StandardMockDatabase() :
- MockPqDatabase("user=postgres dbname=postgres", "postgres", {
+ PQ::Mock("user=postgres dbname=postgres", "postgres", {
rootDir.parent_path().parent_path() / "datasources/schema.sql",
rootDir / "datasources" / "data.sql" })
{
}
StandardMockDatabasePlusOffset::StandardMockDatabasePlusOffset() :
- MockPqDatabase("user=postgres dbname=postgres", "postgres", {
+ PQ::Mock("user=postgres dbname=postgres", "postgres", {
rootDir.parent_path().parent_path() / "datasources" / "schema.sql",
rootDir / "datasources" / "data.sql",
rootDir / "datasources" / "eventOffset.sql" })
diff --git a/p2pvr/daemon/unittests/mockDefs.h b/p2pvr/daemon/unittests/mockDefs.h
index 958e1dd..5df19ca 100644
--- a/p2pvr/daemon/unittests/mockDefs.h
+++ b/p2pvr/daemon/unittests/mockDefs.h
@@ -1,10 +1,9 @@
#ifndef MOCKDEFS_H
#define MOCKDEFS_H
-#include <mockDatasource.h>
-#include <sql-modPQ.h>
+#include <mock.h>
-#define DECLAREMOCK(Name) class Name : public MockPqDatabase { public: Name(); }
+#define DECLAREMOCK(Name) class Name : public PQ::Mock { public: Name(); }
DECLAREMOCK(SchemaOnlyMockDatabase);
DECLAREMOCK(StandardMockDatabase);