summaryrefslogtreecommitdiff
path: root/test/test-ingest.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-09-08 23:39:09 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2025-09-08 23:39:09 +0100
commitbdaa314b7eacc7cd41dbf09f8f8ea6d742c3ea37 (patch)
tree92a6c0eb2c565a2bb624b043b4ee5b03b4e593d0 /test/test-ingest.cpp
parentc6cc3f08638c6a863dd315b8b5a6b667ae51ee84 (diff)
downloadwebstat-bdaa314b7eacc7cd41dbf09f8f8ea6d742c3ea37.tar.bz2
webstat-bdaa314b7eacc7cd41dbf09f8f8ea6d742c3ea37.tar.xz
webstat-bdaa314b7eacc7cd41dbf09f8f8ea6d742c3ea37.zip
Add test over Ingestor::ingestLog
Diffstat (limited to 'test/test-ingest.cpp')
-rw-r--r--test/test-ingest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test-ingest.cpp b/test/test-ingest.cpp
index 463a69c..fd7ad65 100644
--- a/test/test-ingest.cpp
+++ b/test/test-ingest.cpp
@@ -195,6 +195,17 @@ BOOST_DATA_TEST_CASE(StoreLogLine,
BOOST_CHECK_EQUAL(linesDiscarded, 0);
}
+BOOST_AUTO_TEST_CASE(StoreLog, *boost::unit_test::depends_on("I/StoreLogLine"))
+{
+ WebStat::LogFile log {"/tmp/store-log-fixture.log", 10};
+ WebStat::FilePtr input {fopen(log.path.c_str(), "r")};
+ BOOST_REQUIRE(input);
+ ingestLog(input.get());
+ BOOST_CHECK_EQUAL(linesRead, 10);
+ BOOST_CHECK_EQUAL(linesParsed, 10);
+ BOOST_CHECK_EQUAL(linesDiscarded, 0);
+}
+
BOOST_AUTO_TEST_SUITE_END();
BOOST_AUTO_TEST_CASE(FetchRealUserAgentDetail, *boost::unit_test::disabled())