From 34051da2f27ffa40d0b6d20ae891a497fe73bfe5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 17 Jan 2026 19:40:47 +0000 Subject: Attempt to save uninsertable log lines to the entities table If that fails, we still park them as before, such as when the DB is unavailable. Those which are saved as entities require investigation why they couldn't be saved, much like UnparsableLines. --- test/test-ingest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test-ingest.cpp b/test/test-ingest.cpp index 9b77567..efc7bc9 100644 --- a/test/test-ingest.cpp +++ b/test/test-ingest.cpp @@ -263,8 +263,8 @@ BOOST_AUTO_TEST_CASE(ParkLogLineOnError) constexpr std::string_view LOGLINE_BAD_VERB = R"LOG(git.randomdan.homeip.net 98.82.40.168 1755561576768318 CAUSEPARK "/repo/gentoobrowse-api/commit/gentoobrowse-api/unittests/fixtures/756569aa764177340726dd3d40b41d89b11b20c7/app-crypt/pdfcrack/Manifest" "?h=gentoobrowse-api-0.9.1&id=a2ed3fd30333721accd4b697bfcb6cc4165c7714" HTTP/1.1 200 1884 107791 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Amazonbot/0.1; +https://developer.amazon.com/support/amazonbot) Chrome/119.0.6045.214 Safari/537.36")LOG"; BOOST_REQUIRE_NO_THROW(ingestLogLine(LOGLINE_BAD_VERB)); - BOOST_CHECK_EQUAL(linesParked, 1); - BOOST_CHECK(existingEntities.empty()); + BOOST_CHECK_EQUAL(linesParked, 0); + BOOST_CHECK_EQUAL(existingEntities.size(), 1); } BOOST_AUTO_TEST_CASE(IngestParked, *boost::unit_test::depends_on("I/ParkLogLine")) -- cgit v1.2.3