summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-05-31 00:49:55 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-05-31 00:49:55 +0100
commitcc35c2770049aed95d563528f4b7b2a71534528f (patch)
treef231f2aafc7e6dbeca6b21c1218d4a0524bef0e9
parentMerge branch 'gentoobrowse-api-maint2' (diff)
downloadgentoobrowse-api-cc35c2770049aed95d563528f4b7b2a71534528f.tar.bz2
gentoobrowse-api-cc35c2770049aed95d563528f4b7b2a71534528f.tar.xz
gentoobrowse-api-cc35c2770049aed95d563528f4b7b2a71534528f.zip
Remove debug and bind correct fields of bug data
-rw-r--r--gentoobrowse-api/service/maintenanceBugs.cpp5
-rw-r--r--gentoobrowse-api/unittests/testBugs.cpp1
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<int64_t>(*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();