Skip to content

Conversation

@rubenhoenle
Copy link
Member

@rubenhoenle rubenhoenle commented Oct 22, 2025

Description

relates to STACKITCLI-271 / #893

Testing

  1. Verify the output of the plans list command:
    • stackit rabbitmq plans -> Expected output: Table showing the available RabbitMQ plans
    • stackit rabbitmq plans --output-format json -> expected valid JSON output
    • stackit rabbitmq plans --output-format yaml -> expected valid YAML output
  2. With no RabbitMQ instance present in your project: verify the output of the instance list command:
    • stackit rabbitmq instance list -> Expected output: No instances found for project "xxx"
    • stackit rabbitmq instance list --output-format json -> expected valid JSON output
    • stackit rabbitmq instance list --output-format yaml -> expected valid YAML output
  3. Create a RabbitMQ instance: stackit rabbitmq instance create --name my-instance --plan-name stackit-rabbitmq-1.2.10-replica --version 3.13, write the instance id to an env variable export INSTANCE_ID="xxx"
  4. With a RabbitMQ instance present in your project: verify the output of the instance list command again:
    • stackit rabbitmq instance list -> Expected output: Table showing the available RabbitMQ instances in your project
    • stackit rabbitmq instance list --output-format json -> expected valid JSON output
    • stackit rabbitmq instance list --output-format yaml -> expected valid YAML output
  5. Verify the output of the credentials list command with no credentials present:
    • stackit rabbitmq credentials list --instance-id $INSTANCE_ID -> Expected output: No credentials found for instance "my-instance"
    • stackit rabbitmq credentials list --instance-id $INSTANCE_ID --output-format json -> expected valid JSON output
    • stackit rabbitmq credentials list --instance-id $INSTANCE_ID --output-format yaml -> expected valid YAML output
  6. Create a credential: stackit rabbitmq credentials create --instance-id $INSTANCE_ID
  7. Verify the output of the credentials list command again with some credential(s) present:
    • stackit rabbitmq credentials list --instance-id $INSTANCE_ID -> Expected output: Table showing the available credentials for that RabbitMQ instance
    • stackit rabbitmq credentials list --instance-id $INSTANCE_ID --output-format json -> expected valid JSON output
    • stackit rabbitmq credentials list --instance-id $INSTANCE_ID --output-format yaml -> expected valid YAML output
  8. Cleanup: Delete the RabbitMQ instance: stackit rabbitmq instance delete $INSTANCE_ID

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)

@rubenhoenle rubenhoenle requested a review from a team as a code owner October 22, 2025 07:14
@rubenhoenle rubenhoenle self-assigned this Oct 22, 2025
@rubenhoenle rubenhoenle enabled auto-merge (squash) October 29, 2025 07:33
@rubenhoenle rubenhoenle force-pushed the fix/STACKITCLI-271-rabbitmq-json-list-cmd branch from b843796 to 8f67c46 Compare October 29, 2025 07:33
@rubenhoenle rubenhoenle merged commit a14c016 into main Oct 29, 2025
5 checks passed
@rubenhoenle rubenhoenle deleted the fix/STACKITCLI-271-rabbitmq-json-list-cmd branch October 29, 2025 07:39
@github-actions
Copy link

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/create 56.90% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/delete 36.59% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/describe 56.82% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/list 60.00% (+6.00%) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/create 60.20% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/delete 25.58% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/describe 58.33% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/list 57.69% (+5.77%) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/update 57.73% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/plans 53.85% (+5.77%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/list/list.go 60.00% (+6.00%) 50 30 (+3) 20 (-3) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/list/list.go 57.69% (+5.77%) 52 30 (+3) 22 (-3) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/plans/plans.go 53.85% (+5.77%) 52 28 (+3) 24 (-3) 👍

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/rabbitmq/credentials/create/create_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/delete/delete_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/describe/describe_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/list/list_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/create/create_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/delete/delete_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/describe/describe_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/list/list_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/update/update_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/plans/plans_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