-
Notifications
You must be signed in to change notification settings - Fork 34
test(avro-to-json): add unit tests for avro_init configuration parsing #359
Copy link
Copy link
Open
Labels
testingTest infrastructure and test filesTest infrastructure and test files
Description
Description
Follow-up from PR #357 review comment by @auyidi1.
All 7 wireFormat tests added in #357 call parse_with_schema_inner directly. There is no unit test coverage for the avro_init configuration parsing logic itself.
Missing Test Coverage
The following scenarios need unit tests:
- Case-insensitive matching — e.g.,
"CONFLUENT","Confluent"," raw "(trim + lowercase) - Unknown value defaulting — e.g.,
"invalid"→Autowith warning - Missing wireFormat — defaults to
Auto OnceLock::setbehavior — thelet _ = WIRE_FORMAT.set(...)silently ignores errors if called twice
Location
src/500-application/512-avro-to-json/operators/avro-to-json/src/lib.rs
Context
PR #357 introduced the WireFormat enum and avro_init configuration parsing with trim().to_lowercase() transformations. While integration testing may catch some of these, dedicated unit tests for the config parsing logic would be valuable given the string transformations involved.
Related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testingTest infrastructure and test filesTest infrastructure and test files