Skip to content

fix(load-balancer): print valid JSON/YAML output for list cmds#1382

Merged
rubenhoenle merged 3 commits intomainfrom
fix/STACKITCLI-243-load-balancer-json-list-output
Apr 28, 2026
Merged

fix(load-balancer): print valid JSON/YAML output for list cmds#1382
rubenhoenle merged 3 commits intomainfrom
fix/STACKITCLI-243-load-balancer-json-list-output

Conversation

@j1n-o9r
Copy link
Copy Markdown
Contributor

@j1n-o9r j1n-o9r commented Apr 27, 2026

Description

relates to STACKITCLI-241 / #893

Testing Instructions

  • stackit load-balancer list -> Expected: No load balancers found for project "xxx"

  • stackit load-balancer list --output-format json -> Should output valid JSON

  • stackit load-balancer list --output-format yaml -> Should output valid YAML

  • stackit load-balancer observability-credentials list -> Expected: No observability credentials found for Load Balancer on project "xxx"

  • stackit load-balancer observability-credentials list --output-format json -> Should output valid JSON

  • stackit load-balancer observability-credentials list --output-format yaml -> Should output valid YAML

Test with --used flag

  • stackit load-balancer observability-credentials list --used -> Expected: No used observability credentials found for Load Balancer on project "xxx"
  • stackit load-balancer observability-credentials list --output-format json --used -> Should output valid JSON
  • stackit load-balancer observability-credentials list --output-format yaml --used -> Should output valid YAML

Test with --unused flag

  • stackit load-balancer observability-credentials list --unused -> Expected: No unused observability credentials found for Load Balancer on project "xxx"
  • stackit load-balancer observability-credentials list --output-format json --unused -> Should output valid JSON
  • stackit load-balancer observability-credentials list --output-format yaml --unused -> Should output valid YAML

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@j1n-o9r j1n-o9r marked this pull request as ready for review April 27, 2026 15:06
@j1n-o9r j1n-o9r requested a review from a team as a code owner April 27, 2026 15:06
@rubenhoenle rubenhoenle enabled auto-merge (squash) April 28, 2026 09:04
@rubenhoenle rubenhoenle force-pushed the fix/STACKITCLI-243-load-balancer-json-list-output branch from 6bd5bef to bc5cffd Compare April 28, 2026 09:04
@rubenhoenle rubenhoenle merged commit 0a595ed into main Apr 28, 2026
3 checks passed
@rubenhoenle rubenhoenle deleted the fix/STACKITCLI-243-load-balancer-json-list-output branch April 28, 2026 09:08
@github-actions
Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/load-balancer/list 58.49% (+5.66%) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/load-balancer/observability-credentials/list 52.86% (+4.97%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/load-balancer/list/list.go 58.49% (+5.66%) 53 31 (+3) 22 (-3) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/load-balancer/observability-credentials/list/list.go 52.86% (+4.97%) 70 (-1) 37 (+3) 33 (-4) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/stackitcloud/stackit-cli/internal/cmd/load-balancer/list/list_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/load-balancer/observability-credentials/list/list_test.go

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.

3 participants