diff options
-rw-r--r-- | gentoobrowse-api/unittests/mockDefs.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gentoobrowse-api/unittests/mockDefs.cpp b/gentoobrowse-api/unittests/mockDefs.cpp index c06b81a..16d8853 100644 --- a/gentoobrowse-api/unittests/mockDefs.cpp +++ b/gentoobrowse-api/unittests/mockDefs.cpp @@ -15,9 +15,10 @@ MockMailServerImpl::getSentEmails(const Ice::Current &) } Service::Service() : - DB::PluginMock<PQ::Mock>("user=postgres dbname=postgres", "GentooBrowseAPI", { + DB::PluginMock<PQ::Mock>("GentooBrowseAPI", { rootDir.parent_path() / "db" / "schema.sql", - rootDir / "data.sql" }) + rootDir / "data.sql" }, + "user=postgres dbname=postgres") { replace("mailserver", std::make_shared<MockMailServerImpl>()); } @@ -28,8 +29,9 @@ Maintenance::Maintenance() : "--GentooBrowseAPI.RepoRoot=" + (rootDir / "fixtures" / "gitrepo").string(), "--GentooBrowseAPI.BugRoot=file://" + (rootDir / "fixtures" / "bugs").string() }), - DB::PluginMock<PQ::Mock>("user=postgres dbname=postgres", "GentooBrowseAPI", { - rootDir.parent_path() / "db" / "schema.sql" }) + DB::PluginMock<PQ::Mock>("GentooBrowseAPI", { + rootDir.parent_path() / "db" / "schema.sql" }, + "user=postgres dbname=postgres") { replace("mailserver", std::make_shared<MockMailServerImpl>()); } |