Skip to content

test(unikernels): add unit tests for Rumprun#655

Open
r0hansaxena wants to merge 2 commits into
urunc-dev:mainfrom
r0hansaxena:test/rumprun
Open

test(unikernels): add unit tests for Rumprun#655
r0hansaxena wants to merge 2 commits into
urunc-dev:mainfrom
r0hansaxena:test/rumprun

Conversation

@r0hansaxena
Copy link
Copy Markdown

Description

Adds unit tests for the Rumprun unikernel backend, covering SupportsBlock, SupportsFS, MonitorNetCli, MonitorBlockCli, MonitorCli, CommandString and Init. Tests verify the hvt/spt net flags (--net:tap, --net-mac:tap), block passthrough using the fixed rootfs ID, the JSON-like command string construction for cmdline, env vars, net and blk sections, and that Init correctly wires up network interface fields and block device paths.

Related issues

How was this tested?

All unit tests pass locally. Full package tests pass. Linter passes (make lint, 0 issues).

LLM usage

LLM assisted with locating coverage gaps only. All code was written manually and tested 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.

Signed-off-by: r0hansaxena <rohansxn8772@gmail.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 11, 2026

Deploy Preview for urunc ready!

Name Link
🔨 Latest commit 2fced02
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a1ecafd1805dc00089199c2
😎 Deploy Preview https://deploy-preview-655--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@cmainas cmainas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @r0hansaxena ,

thank you for the PR. I have added one comment and please do not use different unit tests for the same function. The tests TestRumprunCommandString_* should be merged under one unit test with sub tests using tables.

Comment thread pkg/unikontainers/unikernels/rumprun_test.go Outdated
Signed-off-by: r0hansaxena <rohansxn8772@gmail.com>
@r0hansaxena
Copy link
Copy Markdown
Author

Could you have a look again? @cmainas

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.

2 participants