Skip to content

Slim down test helpers in config.rs#149

Merged
larsewi merged 2 commits intomasterfrom
inline-config-test-helpers
May 7, 2026
Merged

Slim down test helpers in config.rs#149
larsewi merged 2 commits intomasterfrom
inline-config-test-helpers

Conversation

@larsewi
Copy link
Copy Markdown
Owner

@larsewi larsewi commented May 7, 2026

Summary

  • Drop `make_table_config` — only two callers, the inline struct literal is just as short and self-documents.
  • Collapse `make_field` to a two-arg `field(name, primary_key)`. The previous four-arg version had `value_kind` and `null_sentinel` that were never load-bearing for the `ordered_field_names` tests, and the unlabeled positional args made call sites hard to scan.
  • Brings these tests in line with the rest of the module, which already uses inline `FieldConfig { ..Default::default() }` literals.

@larsewi larsewi added the chore Internal change, excluded from release notes label May 7, 2026
larsewi added 2 commits May 7, 2026 10:17
Drop make_table_config (only two callers, easier to inline) and
collapse make_field down to (name, primary_key) — value_kind and
null_sentinel were never load-bearing for the ordered_field_names
tests, and four positional args made call sites hard to scan.

Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Replace explicit max_field_length/include/exclude defaults with
struct update syntax so each test shows only the fields it exercises.

Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@larsewi larsewi force-pushed the inline-config-test-helpers branch from e252898 to bad81f1 Compare May 7, 2026 08:18
@larsewi larsewi merged commit 0f20819 into master May 7, 2026
6 checks passed
@larsewi larsewi deleted the inline-config-test-helpers branch May 7, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Internal change, excluded from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant