Skip to content

Add network namespace isolation verification helpers to the e2e framework #652

@abhaygoudannavar

Description

@abhaygoudannavar

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

  1. 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.
  2. Review tests/e2e/utils.go for available helpers.
  3. 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.
  4. The test framework currently requires developers to write custom, repetitive nerdctl exec parsing logic for basic network verification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions