From cc35c2770049aed95d563528f4b7b2a71534528f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 31 May 2016 00:49:55 +0100 Subject: Remove debug and bind correct fields of bug data --- gentoobrowse-api/service/maintenanceBugs.cpp | 5 ++--- gentoobrowse-api/unittests/testBugs.cpp | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gentoobrowse-api/service/maintenanceBugs.cpp b/gentoobrowse-api/service/maintenanceBugs.cpp index 88493fd..8f4a821 100644 --- a/gentoobrowse-api/service/maintenanceBugs.cpp +++ b/gentoobrowse-api/service/maintenanceBugs.cpp @@ -25,8 +25,8 @@ namespace Gentoo { { rules.push_back({ { InitialState }, bugLink, [this](auto es) { ins->bindParamI(0, boost::lexical_cast(*es->pattern->match(1))); - ins->bindParamS(2, *es->pattern->match(1)); - ins->bindParamS(1, *es->pattern->match(3)); + ins->bindParamS(2, *es->pattern->match(2)); + ins->bindParamS(1, *es->pattern->match(4)); }}); } @@ -50,7 +50,6 @@ namespace Gentoo { { stk.pop(); if (e == "li") { - fprintf(stderr, "attributes = '%s', summary = '%s'\n", attributes.c_str(), summary.c_str()); extract(attributes.c_str(), attributes.length()); ins->bindParamS(3, summary); ins->execute(); diff --git a/gentoobrowse-api/unittests/testBugs.cpp b/gentoobrowse-api/unittests/testBugs.cpp index 2121d5d..c285c1e 100644 --- a/gentoobrowse-api/unittests/testBugs.cpp +++ b/gentoobrowse-api/unittests/testBugs.cpp @@ -14,6 +14,7 @@ BOOST_AUTO_TEST_CASE( importBugHtml ) auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("GentooBrowseAPI")); SQL_REQUIRE_EQUAL("SELECT COUNT(*) FROM gentoobrowse.bugs", int64_t, expectedBugCount); + db->execute("COPY gentoobrowse.bugs TO '/tmp/bugs.tsv'"); } BOOST_AUTO_TEST_SUITE_END(); -- cgit v1.2.3