summaryrefslogtreecommitdiff
path: root/p2pvr/daemon
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-08-01 21:13:22 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2017-08-01 21:13:22 +0100
commit7ca6523bad267ba1d2886f6bfae1e88cfa8f7c24 (patch)
treee487875de77e8b8d76a3aa31b5b6878a51dcd615 /p2pvr/daemon
parentTemp files for schema should be in bin (diff)
downloadp2pvr-7ca6523bad267ba1d2886f6bfae1e88cfa8f7c24.tar.bz2
p2pvr-7ca6523bad267ba1d2886f6bfae1e88cfa8f7c24.tar.xz
p2pvr-7ca6523bad267ba1d2886f6bfae1e88cfa8f7c24.zip
Mocks should accept and pass through options for DryIce
Diffstat (limited to 'p2pvr/daemon')
-rw-r--r--p2pvr/daemon/unittests/mockDefs.cpp15
-rw-r--r--p2pvr/daemon/unittests/mockDefs.h2
2 files changed, 10 insertions, 7 deletions
diff --git a/p2pvr/daemon/unittests/mockDefs.cpp b/p2pvr/daemon/unittests/mockDefs.cpp
index 49066da..0bba8c0 100644
--- a/p2pvr/daemon/unittests/mockDefs.cpp
+++ b/p2pvr/daemon/unittests/mockDefs.cpp
@@ -3,24 +3,27 @@
namespace P2PVR {
namespace Testing {
-SchemaOnlyMockDatabase::SchemaOnlyMockDatabase() :
+SchemaOnlyMockDatabase::SchemaOnlyMockDatabase(const Ice::StringSeq & opts) :
PQ::Mock("user=postgres dbname=postgres", "postgres", {
- rootDir.parent_path().parent_path() / "datasources" / "schema.sql" })
+ rootDir.parent_path().parent_path() / "datasources" / "schema.sql" }),
+ IceTray::DryIce(opts)
{
}
-StandardMockDatabase::StandardMockDatabase() :
+StandardMockDatabase::StandardMockDatabase(const Ice::StringSeq & opts) :
PQ::Mock("user=postgres dbname=postgres", "postgres", {
rootDir.parent_path().parent_path() / "datasources/schema.sql",
- rootDir / "datasources" / "data.sql" })
+ rootDir / "datasources" / "data.sql" }),
+ IceTray::DryIce(opts)
{
}
-StandardMockDatabasePlusOffset::StandardMockDatabasePlusOffset() :
+StandardMockDatabasePlusOffset::StandardMockDatabasePlusOffset(const Ice::StringSeq & opts) :
PQ::Mock("user=postgres dbname=postgres", "postgres", {
rootDir.parent_path().parent_path() / "datasources" / "schema.sql",
rootDir / "datasources" / "data.sql",
- rootDir / "datasources" / "eventOffset.sql" })
+ rootDir / "datasources" / "eventOffset.sql" }),
+ IceTray::DryIce(opts)
{
}
diff --git a/p2pvr/daemon/unittests/mockDefs.h b/p2pvr/daemon/unittests/mockDefs.h
index 2874ef1..fa6490c 100644
--- a/p2pvr/daemon/unittests/mockDefs.h
+++ b/p2pvr/daemon/unittests/mockDefs.h
@@ -8,7 +8,7 @@
namespace P2PVR {
namespace Testing {
-#define DECLAREMOCK(Name) class DLL_PUBLIC Name : public PQ::Mock, public IceTray::DryIce { public: Name(); }
+#define DECLAREMOCK(Name) class DLL_PUBLIC Name : public PQ::Mock, public IceTray::DryIce { public: Name(const Ice::StringSeq & opts = {}); }
DECLAREMOCK(SchemaOnlyMockDatabase);
DECLAREMOCK(StandardMockDatabase);