summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Jamfile.jam1
-rw-r--r--test/perf-ingest.cpp7
-rw-r--r--test/test-ingest.cpp8
3 files changed, 11 insertions, 5 deletions
diff --git a/test/Jamfile.jam b/test/Jamfile.jam
index 217feec..493c5bc 100644
--- a/test/Jamfile.jam
+++ b/test/Jamfile.jam
@@ -12,6 +12,7 @@ project WebStat-Testing : requirements
<define>TEST=\"$(test)\"
<define>FIXTURES=\"$(fixtures)\"
<library>$(src)//webstat
+ <toolset>gcc,<variant>debug:<cflags>-Wno-missing-field-initializers
;
lib test-util :
diff --git a/test/perf-ingest.cpp b/test/perf-ingest.cpp
index d05de17..3251107 100644
--- a/test/perf-ingest.cpp
+++ b/test/perf-ingest.cpp
@@ -21,8 +21,11 @@ namespace {
void
doIngestFile(benchmark::State & state)
{
- WebStat::Ingestor ingestor {
- WebStat::getTestUtsName("perf-hostname"), std::make_shared<WebStat::MockDBPool>("webstat")};
+ WebStat::Ingestor ingestor {WebStat::getTestUtsName("perf-hostname"),
+ std::make_shared<WebStat::MockDBPool>("webstat"),
+ {
+ .userAgentAPI = {},
+ }};
for (auto loop : state) {
WebStat::FilePtr logFile {fopen(TMP_LOG.c_str(), "r")};
ingestor.ingestLog(logFile.get());
diff --git a/test/test-ingest.cpp b/test/test-ingest.cpp
index 722763a..83bac48 100644
--- a/test/test-ingest.cpp
+++ b/test/test-ingest.cpp
@@ -195,9 +195,11 @@ BOOST_DATA_TEST_CASE(ExtractFields,
class TestIngestor : public WebStat::Ingestor {
public:
TestIngestor() :
- WebStat::Ingestor {WebStat::getTestUtsName("test-hostname"), std::make_shared<MockDBPool>("webstat")}
+ WebStat::Ingestor {WebStat::getTestUtsName("test-hostname"), std::make_shared<MockDBPool>("webstat"),
+ {
+ .userAgentAPI = FIXTURE_URL_BASE + "/userAgent.json",
+ }}
{
- userAgentAPI = FIXTURE_URL_BASE + "/userAgent.json";
}
};
@@ -233,7 +235,7 @@ BOOST_AUTO_TEST_CASE(FetchMockUserAgentDetail)
{
const auto uaDetailReq = WebStat::curlGetUserAgentDetail(0,
R"(Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36)",
- userAgentAPI.c_str());
+ settings.userAgentAPI.c_str());
BOOST_REQUIRE(uaDetailReq);
BOOST_REQUIRE_EQUAL(CURLE_OK, curl_easy_perform(uaDetailReq->hnd.get()));