Skip to content

Conversation

@rubenhoenle
Copy link
Member

@rubenhoenlerubenhoenle 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)

@rubenhoenlerubenhoenle requested a review from a team as a code ownerOctober 22, 2025 07:14
@rubenhoenlerubenhoenle self-assigned this Oct 22, 2025
@rubenhoenlerubenhoenle enabled auto-merge (squash) October 29, 2025 07:33
@rubenhoenlerubenhoenleforce-pushed the fix/STACKITCLI-271-rabbitmq-json-list-cmd branch from b843796 to 8f67c46CompareOctober 29, 2025 07:33
@rubenhoenlerubenhoenle merged commit a14c016 into mainOct 29, 2025
5 checks passed
@rubenhoenlerubenhoenle 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 PackagesCoverage Δ🤖
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/create56.90% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/delete36.59% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/describe56.82% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/list60.00% (+6.00%)👍
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/create60.20% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/delete25.58% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/describe58.33% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/list57.69% (+5.77%)👍
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/update57.73% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/plans53.85% (+5.77%)👍

Coverage by file

Changed files (no unit tests)

Changed FileCoverage ΔTotalCoveredMissed🤖
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/credentials/list/list.go60.00% (+6.00%)5030 (+3)20 (-3)👍
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/instance/list/list.go57.69% (+5.77%)5230 (+3)22 (-3)👍
github.com/stackitcloud/stackit-cli/internal/cmd/rabbitmq/plans/plans.go53.85% (+5.77%)5228 (+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 freeto 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

@rubenhoenle@Fyusel