diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-31 00:49:55 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-31 00:49:55 +0100 |
commit | cc35c2770049aed95d563528f4b7b2a71534528f (patch) | |
tree | f231f2aafc7e6dbeca6b21c1218d4a0524bef0e9 | |
parent | Merge branch 'gentoobrowse-api-maint2' (diff) | |
download | gentoobrowse-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.cpp | 5 | ||||
-rw-r--r-- | 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<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(); |