From dbcbb3360863dffd82ae1b2748c81d23a9173d8c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 17 Feb 2017 21:54:49 +0000 Subject: Create maintenance mock and client once per test, not globally --- gentoobrowse-api/unittests/Jamfile.jam | 1 + gentoobrowse-api/unittests/testMaintenance.cpp | 6 +++--- 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 : dryice ../service//gentoobrowse-service : : + dbpp-postgresql ..//dbppcore ..//adhocutil ..//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 #include -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 -- cgit v1.2.3