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
commitdb034e19c42b5dab102ff1530b72d5c0dac2fb95 (patch)
treef231f2aafc7e6dbeca6b21c1218d4a0524bef0e9
parentIgnore .ebuild files, lots of them and we don't use them (diff)
downloadgentoobrowse-api-db034e19c42b5dab102ff1530b72d5c0dac2fb95.tar.bz2
gentoobrowse-api-db034e19c42b5dab102ff1530b72d5c0dac2fb95.tar.xz
gentoobrowse-api-db034e19c42b5dab102ff1530b72d5c0dac2fb95.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();