Skip to content

test(kubernetes): add unit tests for ingressStatusAddressesFromService - #4314

Merged
szuecs merged 1 commit into
zalando:masterfrom
shardool-patil:test/ingress-status-addresses-from-service
Oct 6, 2026
Merged

szuecs merged 1 commit into
zalando:masterfrom
shardool-patil:test/ingress-status-addresses-from-service

Conversation

@shardool-patil

Copy link
Copy Markdown
Contributor

Description

Adds unit tests for dataclients/kubernetes to exercise previously untested service resolution paths and error cases in ingressStatusAddressesFromService:

  • ingressStatusAddressesFromService: test empty ingress status service configuration returning nil addresses.
  • ingressStatusAddressesFromService: test invalid namespace/name syntax error return.
  • ingressStatusAddressesFromService: test service not found in cluster state and nil spec error handling.
  • ingressStatusAddressesFromService: test ExternalName type with valid hostname and empty hostname returning nil.
  • ingressStatusAddressesFromService: test ClusterIP type with valid IP, empty IP, and "None" (headless) returning nil.
  • ingressStatusAddressesFromService: test NodePort type with ExternalIPs and fallback to endpoint addresses.
  • ingressStatusAddressesFromService: test LoadBalancer type with ingress status (filtering entries missing both IP and hostname), fallback to ExternalIPs, and empty status returning nil.
  • ingressStatusAddressesFromService: test fallback/custom service type with ExternalIPs and without ExternalIPs returning nil.

Coverage Impact

  • dataclients/kubernetes/clusterclient.go:ingressStatusAddressesFromService statement coverage: 53.1% -> 100.0%

@szuecs szuecs added minor no risk changes, for example new filters test Missing test case labels Oct 3, 2026
Comment thread dataclients/kubernetes/ingress_status_test.go
Signed-off-by: Shardool Patil <shardoolpatil999@gmail.com>
@shardool-patil
shardool-patil force-pushed the test/ingress-status-addresses-from-service branch from eb3d04c to a8b4f32 Compare October 5, 2026 10:01
@szuecs
szuecs merged commit 4f6cd0a into zalando:master Oct 6, 2026
29 of 30 checks passed
larry-dalmeida added a commit to larry-dalmeida/kubernetes-on-aws that referenced this pull request Oct 8, 2026
Includes zalando/skipper#4315 (background cache revalidation fix) and
zalando/skipper#4314.

ref: zalando/skipper@v0.28.1...v0.28.29

Signed-off-by: Larry D Almeida <hello@larrydalmeida.com>
larry-dalmeida added a commit to larry-dalmeida/kubernetes-on-aws that referenced this pull request Oct 8, 2026
Includes zalando/skipper#4315 (background cache revalidation fix) and
zalando/skipper#4314.

ref: zalando/skipper@v0.28.1...v0.28.29

Signed-off-by: Larry D Almeida <hello@larrydalmeida.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor no risk changes, for example new filters test Missing test case

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants