diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-24 21:02:28 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-24 21:02:28 +0100 |
commit | 662bad18245fca506fbb73a300c99cd6fb212199 (patch) | |
tree | 368bf4ae90bfb8c3593640bed479358c6a7708c4 | |
parent | Non-const processor methods and prepare, apply and tidy events (diff) | |
download | gentoobrowse-api-662bad18245fca506fbb73a300c99cd6fb212199.tar.bz2 gentoobrowse-api-662bad18245fca506fbb73a300c99cd6fb212199.tar.xz gentoobrowse-api-662bad18245fca506fbb73a300c99cd6fb212199.zip |
Add count tests for deps
-rw-r--r-- | gentoobrowse-api/unittests/testMaintenance.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gentoobrowse-api/unittests/testMaintenance.cpp b/gentoobrowse-api/unittests/testMaintenance.cpp index 263f9ef..cef7554 100644 --- a/gentoobrowse-api/unittests/testMaintenance.cpp +++ b/gentoobrowse-api/unittests/testMaintenance.cpp @@ -45,7 +45,7 @@ BOOST_FIXTURE_TEST_SUITE(tp, TestClient) void doRefreshPackageTree(SampleData & sd, DB::ConnectionPtr db, const std::string & archive, const std::string & dir, Gentoo::MaintenancePrx m, int64_t files, int64_t cats, int64_t devvcs, int64_t pkgs, int64_t ebs, int64_t ebus, - int64_t ebas, int64_t pus, int64_t ug, int64_t ul, int64_t ugs, int64_t ugds) + int64_t ebas, int64_t pus, int64_t ug, int64_t ul, int64_t ugs, int64_t ugds, int64_t deps, int64_t rdeps) { if (!archive.empty()) { sd.extract(archive, dir); @@ -65,6 +65,8 @@ doRefreshPackageTree(SampleData & sd, DB::ConnectionPtr db, const std::string & SQL_REQUIRE_EQUAL("SELECT COUNT(*) FROM gentoobrowse.use_local", int64_t, ul); SQL_REQUIRE_EQUAL("SELECT COUNT(*) FROM gentoobrowse.use_groups", int64_t, ugs); SQL_REQUIRE_EQUAL("SELECT COUNT(*) FROM gentoobrowse.use_group", int64_t, ugds); + SQL_REQUIRE_EQUAL("SELECT COUNT(*) FROM gentoobrowse.ebuild_deps", int64_t, deps); + SQL_REQUIRE_EQUAL("SELECT COUNT(*) FROM gentoobrowse.ebuild_rdeps", int64_t, rdeps); } BOOST_AUTO_TEST_CASE( refreshPackageTree ) @@ -77,7 +79,7 @@ BOOST_AUTO_TEST_CASE( refreshPackageTree ) insRepo->execute(); doRefreshPackageTree(sd, db, "4156eb45cf3b0ce1d7125b84efd8688c2d6e831d", "gentoo", - m, 2084, 5, 1, 482, 981, 3626, 4593, 501, 393, 238, 50, 1573); + m, 2084, 5, 1, 482, 981, 3626, 4593, 501, 393, 238, 50, 1573, 1323, 1059); db->execute("COPY gentoobrowse.categories TO '/tmp/categories1.tsv'"); db->execute("COPY gentoobrowse.packages TO '/tmp/packages1.tsv'"); @@ -93,7 +95,7 @@ BOOST_AUTO_TEST_CASE( refreshPackageTree ) db->execute("COPY gentoobrowse.ebuild_masks TO '/tmp/ebuild_masks1.tsv'"); doRefreshPackageTree(sd, db, "756569aa764177340726dd3d40b41d89b11b20c7", "gentoo", - m, 2087, 5, 1, 484, 982, 3638, 4599, 503, 393, 238, 50, 1573); + m, 2087, 5, 1, 484, 982, 3638, 4599, 503, 393, 238, 50, 1573, 2009, 1546); db->execute("COPY gentoobrowse.categories TO '/tmp/categories2.tsv'"); db->execute("COPY gentoobrowse.packages TO '/tmp/packages2.tsv'"); @@ -109,7 +111,7 @@ BOOST_AUTO_TEST_CASE( refreshPackageTree ) db->execute("COPY gentoobrowse.ebuild_masks TO '/tmp/ebuild_masks2.tsv'"); doRefreshPackageTree(sd, db, "", "gentoo", - m, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + m, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); m->refreshPackageTree(); } |