Skip to content

test(hypervisors): add unit tests for CloudHypervisor#617

Open
r0hansaxena wants to merge 1 commit intourunc-dev:mainfrom
r0hansaxena:test/cloud-hypervisor
Open

test(hypervisors): add unit tests for CloudHypervisor#617
r0hansaxena wants to merge 1 commit intourunc-dev:mainfrom
r0hansaxena:test/cloud-hypervisor

Conversation

@r0hansaxena
Copy link
Copy Markdown

@r0hansaxena r0hansaxena commented May 4, 2026

Description

Adds unit tests for the CloudHypervisor VMM backend, covering BuildExecCmd and the simpler interface methods (UsesKVM, Ok, Path, PreExec, SupportsSharedfs). Tests are table-driven and cover all flag-generation branches including memory, networking, block devices, initrd, virtiofs and vsock.

Related issues

How was this tested?

Ran unit tests locally:

go test ./pkg/unikontainers/hypervisors/ -v -run "TestCloudHypervisor"

All 20 test cases passed. Full package tests also pass:

go test ./pkg/... ./internal/...

Linter passes locally (make lint, 0 issues).

LLM usage

Claude Sonnet 4.6 was used to assist with writing the tests. All code was reviewed and tested locally before submission.

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.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 4, 2026

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit df20eb8
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/69f8c542baf45a000868efcd

Signed-off-by: r0hansaxena <rohansxn8772@gmail.com>
@r0hansaxena r0hansaxena force-pushed the test/cloud-hypervisor branch from 4d233e4 to df20eb8 Compare May 4, 2026 16:11
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.

1 participant