Skip to content

test(v0.7): add comprehensive unit tests for Kraftfile v0.7 parser#2782

Closed
alok-108 wants to merge 1 commit intounikraft:stagingfrom
alok-108:test/kraftfile-v0.7
Closed

test(v0.7): add comprehensive unit tests for Kraftfile v0.7 parser#2782
alok-108 wants to merge 1 commit intounikraft:stagingfrom
alok-108:test/kraftfile-v0.7

Conversation

@alok-108
Copy link
Copy Markdown

@alok-108 alok-108 commented Apr 9, 2026

Summary

Adds unit tests for the Kraftfile v0.7 schema parser introduced in #2776. This PR ensures correctness of parsing, error handling, and round-trip serialization.

Changes

  • Created pkg/app/schema/v0.7/parser_test.go with table-driven tests.
    • Added testdata/ directory containing sample Kraftfiles (minimal, full, invalid, wrong version).
    • Tests cover:
    • Minimal valid config
    • Full config with all fields
    • Invalid YAML syntax
    • Rejection of wrong version (e.g., v0.6)
    • Round-trip consistency

Motivation

Comprehensive tests are essential for the new parser to be merged confidently. They validate the implementation against the v0.7 spec and prevent regressions.

Related Issue

Contributes to #2682

Testing Done

Notes for Reviewers

This PR is complementary to #2776 and does not modify any existing logic.
Dependency: This PR builds on the types defined in #2776. It should be merged into the pr-2776 branch first, or reviewed alongside it. Once #2776 is merged, this test suite can be directly integrated.

@github-project-automation github-project-automation Bot moved this to 🧊 Icebox in KraftKit Roadmap Apr 9, 2026
@craciunoiuc craciunoiuc closed this Apr 9, 2026
@github-project-automation github-project-automation Bot moved this from 🧊 Icebox to 🚀 Done in KraftKit Roadmap Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Done

Development

Successfully merging this pull request may close these issues.

2 participants