Skip to content

Using default nodePort in tests in unreliable because it might already be occupied on CI #677

@pmalek

Description

@pmalek

Problem statement

Using a concrete, default nodePort:

"--set", "proxy.http.nodePort=30080",
proves to be unreliable in tests, especially in CI since we don't have full control over the environment and sometimes the port can be already occupied e.g. https://github.com/Kong/kubernetes-testing-framework/actions/runs/5022546754/jobs/9006138317#step:8:144 which fails the test.

Proposed solution

Use something like github.com/phayes/freeport which allows finding a free port and use that in tests.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions