Skip to content

Bug: K3SContainer calls get_container_host_ip in constructor before container is started #861

@ndellosa95

Description

@ndellosa95

Describe the bug

K3SContainer calls get_container_host_ip in its __init__ method here and here before the container is started, causing it to fail with an AssertionError here.

To Reproduce

from testcontainers.k3s import K3SContainer

with K3SContainer() as k3s:
     print("gonna throw an error before I even get here :(")

Runtime environment

I'm on an ARM Mac and this is in Python 3.12, but that shouldn't make a difference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions