diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-04-15 12:03:21 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-04-15 12:05:20 +0100 |
| commit | 5b2166496e5f3ff2c4276e0b5b28f109c70673d5 (patch) | |
| tree | 93c351f6ef7d3d60d60247d5dbf531496f14a06c /test | |
| parent | 3ce6cf305572709332d7329674ec45c987a093ad (diff) | |
| download | webstat-5b2166496e5f3ff2c4276e0b5b28f109c70673d5.tar.bz2 webstat-5b2166496e5f3ff2c4276e0b5b28f109c70673d5.tar.xz webstat-5b2166496e5f3ff2c4276e0b5b28f109c70673d5.zip | |
Replace use of crc32 for entity id
Entity value is MD5 hashed same as DB unique key, but the id itself is
now taken from the DB primary key which is sequence generated.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test-ingest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test-ingest.cpp b/test/test-ingest.cpp index d399288..88e80e8 100644 --- a/test/test-ingest.cpp +++ b/test/test-ingest.cpp @@ -406,10 +406,10 @@ BOOST_AUTO_TEST_CASE(DiscardUnparsable) BOOST_REQUIRE_NO_THROW(tryIngestQueuedLogLines()); auto dbconn = dbpool->get(); auto select = dbconn->select("SELECT id::bigint, value FROM entities WHERE type = 'unparsable_line'"); - constexpr std::array<std::tuple<Crc32Value, std::string_view>, 1> EXPECTED {{ - {1664299262, "does not parse"}, + constexpr std::array<std::tuple<EntityId, std::string_view>, 1> EXPECTED {{ + {18, "does not parse"}, }}; - auto rows = select->as<Crc32Value, std::string_view>(); + auto rows = select->as<EntityId, std::string_view>(); BOOST_CHECK_EQUAL_COLLECTIONS(rows.begin(), rows.end(), EXPECTED.begin(), EXPECTED.end()); BOOST_CHECK_EQUAL(stats.linesParseFailed, 1); BOOST_CHECK_EQUAL(stats.entitiesInserted, 1); |
