Description
The current tests/e2e/utils.go provides excellent helpers for validating UTS, Mount, and Time namespaces (e.g., compareNS, getProcNS), but it lacks reusable verification helpers for Network namespace state inside the testing framework. As we look towards improving DNS resolution and localhost networking across different CNIs in the future, we need the testing tools to verify these behaviors first. We should add pure testing helpers such as GetResolvConf(containerID string) and a dummy CheckLocalhostRouting(containerID string) to utils.go so future contributors can easily write e2e tests for complex networking scenarios.
System info
- Urunc version: main (HEAD)
- Arch: All
- VMM: All
- Unikernel: All
Steps to reproduce
- Attempt to write a new e2e test in
tests/e2e/ that verifies if a specific /etc/resolv.conf nameserver was correctly injected into a sandboxed container.
- Review
tests/e2e/utils.go for available helpers.
- Notice that while we can ping an IP (
pingUnikernel), there are no utility functions to extract or parse network configurations (like resolv.conf or loopback routing) from the running sandbox.
- The test framework currently requires developers to write custom, repetitive
nerdctl exec parsing logic for basic network verification.
Description
The current
tests/e2e/utils.goprovides excellent helpers for validating UTS, Mount, and Time namespaces (e.g.,compareNS,getProcNS), but it lacks reusable verification helpers for Network namespace state inside the testing framework. As we look towards improving DNS resolution and localhost networking across different CNIs in the future, we need the testing tools to verify these behaviors first. We should add pure testing helpers such asGetResolvConf(containerID string)and a dummyCheckLocalhostRouting(containerID string)toutils.goso future contributors can easily write e2e tests for complex networking scenarios.System info
Steps to reproduce
tests/e2e/that verifies if a specific/etc/resolv.confnameserver was correctly injected into a sandboxed container.tests/e2e/utils.gofor available helpers.pingUnikernel), there are no utility functions to extract or parse network configurations (likeresolv.confor loopback routing) from the running sandbox.nerdctl execparsing logic for basic network verification.