Skip to content

fix: use StaticNetworkUnikernelIP constant in httpStaticNetTest#67

Open
mdryaan wants to merge 1 commit into
urunc-dev:mainfrom
mdryaan:fix/http-static-net-test
Open

fix: use StaticNetworkUnikernelIP constant in httpStaticNetTest#67
mdryaan wants to merge 1 commit into
urunc-dev:mainfrom
mdryaan:fix/http-static-net-test

Conversation

@mdryaan
Copy link
Copy Markdown

@mdryaan mdryaan commented May 15, 2026

Description

httpStaticNetTest in tests/e2e/test_functions.go derived the unikernel's IP address by splitting the tap device's IPv4 and hardcoding .2 as the last octet. constants.StaticNetworkUnikernelIP (172.16.1.2) already defines this value.

This removes the tap interface lookup, address iteration, and IP recomputation entirely, replacing them with a direct use of the constant. Also removes the commented-out net/http block (lines 420–434) that was never resolved. The
now-unused imports "net" and "github.com/asaskevich/govalidator" are dropped; "github.com/urunc-dev/urunc/internal/constants" is added.

Related issues

How was this tested?

tests/e2e/test_functions.go is the only file changed. The tap-finding and IP derivation block (lines 371–407) is replaced with
url := fmt.Sprintf("http://%s:8080", constants.StaticNetworkUnikernelIP). The commented-out block (lines 420–434) is removed.

golangci-lint run -v --timeout=5m — 0 new issues.
make unittest — all pass.
make — builds cleanly.

Full e2e verification requires a Firecracker + Unikraft environment running the
make — builds cleanly.

Full e2e verification requires a Firecracker + Unikraft environment running the
Firecracker-unikraft-httpreply-static-net test case.

LLM usage

N/A

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: Md Raiyan <alikhurshid842001@gmail.com>
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.

httpStaticNetTest hardcodes unikernel IP offset and contains unresolved dead code

1 participant