Skip to content

feat(tests): add YAML and JSON variants of test_generate_config#25449

Open
singhvishalkr wants to merge 1 commit into
vectordotdev:masterfrom
singhvishalkr:fix-21865-yaml-json-generate-config
Open

feat(tests): add YAML and JSON variants of test_generate_config#25449
singhvishalkr wants to merge 1 commit into
vectordotdev:masterfrom
singhvishalkr:fix-21865-yaml-json-generate-config

Conversation

@singhvishalkr
Copy link
Copy Markdown

This adds est_generate_config_yaml and est_generate_config_json functions alongside the existing est_generate_config (TOML) helper.

Vector's first-class config format is now YAML, but the test helper only validates TOML round-trips. Components that want to test config generation against YAML or JSON can now use the new variants.

The implementation mirrors the existing TOML function - serialize with serde_yaml/serde_json, then deserialize and panic with context if it fails.

Closes #21865

Vector's first-class configuration format is now YAML, but the
test_generate_config helper only validates TOML serialization.
Add test_generate_config_yaml and test_generate_config_json to
let component tests verify config round-trips in all three formats.

Closes vectordotdev#21865
@singhvishalkr singhvishalkr requested a review from a team as a code owner May 16, 2026 08:59
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 16, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@singhvishalkr singhvishalkr changed the title feat(test_util): add YAML and JSON variants of test_generate_config feat(tests): add YAML and JSON variants of test_generate_config May 16, 2026
@singhvishalkr
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

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.

Provide generic generate_config and test_generate_config

1 participant