Skip to content

test: add unit tests for Firecracker hypervisor#769

Open
sahilforkshere wants to merge 1 commit into
urunc-dev:mainfrom
sahilforkshere:test/firecracker-unit-tests
Open

test: add unit tests for Firecracker hypervisor#769
sahilforkshere wants to merge 1 commit into
urunc-dev:mainfrom
sahilforkshere:test/firecracker-unit-tests

Conversation

@sahilforkshere

Copy link
Copy Markdown

Description

Adds unit tests for the Firecracker hypervisor in
pkg/unikontainers/hypervisors/firecracker.go, which previously had no
test coverage. The tests cover BuildExecCmd (the generated launch
command and the JSON config it produces) and the smaller helper methods
(Path, UsesKVM, Ok, PreExec, SupportsSharedfs).

This is a step toward improving overall unit test coverage as requested
in #96.

Related issues

How was this tested?

Ran locally:

  • go test ./pkg/unikontainers/hypervisors/ — all tests pass
  • go vet ./pkg/unikontainers/hypervisors/ — clean
  • gofmt -l — no formatting issues

No production code was changed; this PR only adds a new test file.

LLM Usage

I used Claude as a development assistant while writing these tests. I determined the test coverage, reviewed and edited the code, and verified that the implementation builds and passes all tests locally.

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

Add unit tests covering Firecracker.BuildExecCmd (generated launch
command and JSON config) and its helper methods.

Fixes: urunc-dev#96
Signed-off-by: Sahil <paalsahil04@gmail.com>
@netlify

netlify Bot commented Jun 21, 2026

Copy link
Copy Markdown

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit 0ecb07c
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a383dd95f5ac700089534ae

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.

Add more unit tests

1 participant