Skip to content

fix: use StaticNetworkUnikernelIP constant in httpStaticNetTest - #67

Open
mdryaaan wants to merge 3 commits into
urunc-dev:mainfrom
mdryaaan:fix/http-static-net-test
Open

mdryaaan wants to merge 3 commits into
urunc-dev:mainfrom
mdryaaan:fix/http-static-net-test

Conversation

@mdryaaan

Copy link
Copy Markdown
Contributor

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.

cmainas and others added 3 commits May 8, 2026 12:24
PR: urunc-dev#58
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Panagiotis Mavrikos <pmavrikos@nubificus.co.uk>
Approved-by: Panagiotis Mavrikos <pmavrikos@nubificus.co.uk>
PR: urunc-dev#59
Signed-off-by: char ma <test@mail.com>
Reviewed-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Approved-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Signed-off-by: Md Raiyan <alikhurshid842001@gmail.com>
@cmainas
cmainas force-pushed the main branch 2 times, most recently from 5bae1ca to 27f3d06 Compare September 16, 2026 08:02
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

3 participants