Skip to content

test(unikraft/plat): Add unit tests for plat package - #2709

Closed
adity1raut wants to merge 1 commit into
unikraft:stagingfrom
adity1raut:test-plat
Closed

adity1raut wants to merge 1 commit into
unikraft:stagingfrom
adity1raut:test-plat

Conversation

@adity1raut

Copy link
Copy Markdown

…overage

Prerequisite checklist

Description of changes

Summary

  • Adds unit tests for unikraft/plat package achieving 100% coverage

Functions tested

  • All PlatformConfig accessors: Name, String, Source, Version, Type, Path
  • IsUnpacked — existing dir, non-existent, empty path
  • KConfigTree — returns nil, nil
  • MarshalYAML — returns nil, nil
  • PrintInfo — returns non-empty string
  • KConfig — correct CONFIG_PLAT_* keys for fc, firecracker, kraftcloud,
    kvm, qemu, xen, linuxu, unknown
  • TransformFromSchema — string input, alias rewrite (firecracker→fc,
    kvm→qemu), unknown name kept as-is, non-string errors, UK_BASE context
  • All options: WithName, WithVersion, WithSource, WithPath,
    WithInternal, WithKConfig

Related Issue

Closes #2708

Test plan

  • Run go test kraftkit.sh/unikraft/plat -cover → 100%
  • Run golangci-lint run ./unikraft/plat/... → 0 issues

…overage

Signed-off-by: adity1raut <araut7798@gmail.com>
@github-project-automation github-project-automation Bot moved this to 🧊 Icebox in KraftKit Roadmap Mar 9, 2026
@nderjung nderjung closed this Mar 9, 2026
@github-project-automation github-project-automation Bot moved this from 🧊 Icebox to 🚀 Done in KraftKit Roadmap Mar 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.

test(unikraft/plat): Add unit tests for plat package to achieve 100% coverage

2 participants