diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-09-24 21:28:56 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-09-24 21:33:13 +0100 |
commit | 897546d596d8d7213cff60146123bb8f97d4d1cc (patch) | |
tree | aa3ec6a8db09d6eaf915805986e57d691c7d11f6 /test/test-ingest.cpp | |
parent | 71803b97f1c9e31f2027da48bb742353f9c43e62 (diff) | |
download | webstat-897546d596d8d7213cff60146123bb8f97d4d1cc.tar.bz2 webstat-897546d596d8d7213cff60146123bb8f97d4d1cc.tar.xz webstat-897546d596d8d7213cff60146123bb8f97d4d1cc.zip |
Create settings structure
Holds all the settings and their defaults for use in program_options and
tests. Disables missing-field-initializers in tests because its over
sensitive to structures with defaults where you only provide some values
specifically.
Diffstat (limited to 'test/test-ingest.cpp')
-rw-r--r-- | test/test-ingest.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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())); |