Andrew Hay 6cf328f037
refactor(service): reduce cyclomatic complexity of extractHeadlessEndpoints (#5822)
* feat: reduce cyclomatic complexity of service_test

* style: indention added

* style: tab

* refactor: address PR feedback, improve tests, and reduce complexity

* fix(service): address PR feedback and fix linting

* Revert "fix(service): address PR feedback and fix linting"

This reverts commit 4cba488dc741ee1d946b105da952c09893c289c4.

* refactor: address all PR feedback - improve method naming, add test coverage, fix parameter ordering

* refactor: address latest PR feedback - convert to method, use testutils, add test coverage

* test: add coverage for pod hostname scenario

Addresses 4th to last PR comment about missing test coverage for
the case where pod.Spec.Hostname is set, which creates additional
headless domains (pod-specific hostname + base hostname)

* style: remove extra line

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>

* style: remove extra line

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>

---------

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
2025-09-23 00:04:16 -07:00
..
2021-08-12 14:12:44 +02:00
2025-04-16 13:50:04 +01:00