summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-02-17 21:54:49 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2017-02-17 21:54:49 +0000
commit85c91e10c1f4eb3f3285c5b8380689d649eb2ada (patch)
treee4e337e6109be75a1a629bc465eb0404527583f4
parentRename maint change logs for common git operations (diff)
downloadgentoobrowse-api-85c91e10c1f4eb3f3285c5b8380689d649eb2ada.tar.bz2
gentoobrowse-api-85c91e10c1f4eb3f3285c5b8380689d649eb2ada.tar.xz
gentoobrowse-api-85c91e10c1f4eb3f3285c5b8380689d649eb2ada.zip
Create maintenance mock and client once per test, not globally
-rw-r--r--gentoobrowse-api/unittests/Jamfile.jam1
-rw-r--r--gentoobrowse-api/unittests/testMaintenance.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/gentoobrowse-api/unittests/Jamfile.jam b/gentoobrowse-api/unittests/Jamfile.jam
index 1ecae8a..7ee7ab1 100644
--- a/gentoobrowse-api/unittests/Jamfile.jam
+++ b/gentoobrowse-api/unittests/Jamfile.jam
@@ -30,6 +30,7 @@ lib testCommon :
<library>dryice
<library>../service//gentoobrowse-service
: :
+ <library>dbpp-postgresql
<library>..//dbppcore
<library>..//adhocutil
<library>..//IceBox
diff --git a/gentoobrowse-api/unittests/testMaintenance.cpp b/gentoobrowse-api/unittests/testMaintenance.cpp
index 4c3bffe..015a596 100644
--- a/gentoobrowse-api/unittests/testMaintenance.cpp
+++ b/gentoobrowse-api/unittests/testMaintenance.cpp
@@ -6,7 +6,9 @@
#include <buffer.h>
#include <modifycommand.h>
-BOOST_GLOBAL_FIXTURE( Maintenance );
+class MaintenanceClientCombined : public Maintenance, public TestClient { };
+
+BOOST_FIXTURE_TEST_SUITE(maintenance, MaintenanceClientCombined)
const boost::filesystem::path treeDir(binDir / "tree" / "gentoobrowse");
const boost::filesystem::path fixturesDir(rootDir / "fixtures");
@@ -36,8 +38,6 @@ class SampleData {
}
};
-BOOST_FIXTURE_TEST_SUITE(tp, TestClient)
-
void dumpDb(DB::ConnectionPtr db);
void