Skip to content

Conversation

@Alokzh
Copy link

@Alokzh Alokzh commented Aug 4, 2025

Description

This PR introduces comprehensive unit tests for the node IP discovery logic located in the pkg/cluster package.

How Has This Been Tested?

The new functionality has been validated through local unit testing

go test -v ./pkg/cluster/...
go test -v ./pkg/cluster/... -cover

The new tests for GetNodeIP verify several key scenarios, including:

  • Correctly filtering for gateway nodes
  • The fallback from ExternalIP to InternalIP
  • Error handling when no nodes are found

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have ran go fmt
  • I have updated the helm chart as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit test cases.
  • I have verified the E2E test cases with new code changes.
  • I have added all the required E2E test cases.

Does this PR introduce a breaking change?


Signed-off-by: Alokzh <zhalok24@gmail.com>
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.

2 participants