Skip to content

refactor: consolidate batch fields tests into table-driven test#42

Merged
sofq merged 1 commit intomainfrom
refactor/simplify-batch-fields-tests
Mar 16, 2026
Merged

refactor: consolidate batch fields tests into table-driven test#42
sofq merged 1 commit intomainfrom
refactor/simplify-batch-fields-tests

Conversation

@sofq
Copy link
Copy Markdown
Owner

@sofq sofq commented Mar 16, 2026

Summary

  • Collapse two near-identical test functions (TestBatch_PerOpFieldsOverrideGlobal and TestBatch_GlobalFieldsAppliedWhenNoPerOpFields) into a single table-driven TestBatch_FieldsPrecedence
  • Hoist opMap construction outside the test loop (built once instead of twice)
  • Net reduction of 37 lines with no behavior change

Test plan

  • go test ./cmd/ -run TestBatch_FieldsPrecedence -v passes both subtests

… test

Collapse two near-identical test functions (TestBatch_PerOpFieldsOverrideGlobal
and TestBatch_GlobalFieldsAppliedWhenNoPerOpFields) into a single table-driven
TestBatch_FieldsPrecedence. Hoists opMap construction outside the loop so it's
built once instead of twice.
@sofq sofq merged commit 3551f5b into main Mar 16, 2026
9 checks passed
@sofq sofq deleted the refactor/simplify-batch-fields-tests branch March 16, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant