ryerraguntla commented on code in PR #3519: URL: https://github.com/apache/iggy/pull/3519#discussion_r3812657749
########## gateways/kafka/docs/TEST_SUITE.md: ########## @@ -0,0 +1,59 @@ +# Kafka gateway — automated regression test suite + +Regression tests live under [`tests/`](../tests/). Run from the workspace root: + +```bash +cargo test -p iggy-gateway-kafka +``` + +## Prerequisites + +### Wire fixtures (required for `decode_validation_tests` and some handler tests) + +```bash +./gateways/kafka/scripts/ci-wire-fixtures.sh generate +``` + +Fixtures are gitignored under `tools/kafka-tool/kafka_messages/`. CI runs the same script +before `rust-gateway` test jobs and removes the directory afterward. Every fixture-dependent +suite goes through `tests/common/fixtures.rs::load_fixture_body_or_skip`, which skips with a +regeneration hint when a fixture is missing, and panics instead when `KAFKA_FIXTURES_REQUIRED=1` +is set (CI sets this) so a broken generation step can't leave a suite green with zero assertions. + +--- + +## Test files + +An exact per-file test count and a full test-name-to-scenario matrix used to live here; both +drifted out of sync with the actual suites more than once as tests were added and consolidated. +Rather than re-derive a snapshot that will drift again, this only lists what each file is for — +`cargo test -p iggy-gateway-kafka -- --list` gives the exact current test names. + +| File | Suite focus | Depends on fixtures | +| ------ | ------------- | --------------------- | +| [`codec_tests.rs`](../tests/codec_tests.rs) | Primitive encode/decode round-trips, varint, compact strings, tagged fields | No | Review Comment: Table regenerated from actual tests/*.rs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
