Skip to content

Conversation

@rubenhoenle
Copy link
Member

@rubenhoenle rubenhoenle commented Oct 21, 2025

Description

relates to STACKITCLI-267 / #893

Testing

  1. With no object storage bucket present in your project, verify the bucket list command output:
    • stackit object-storage bucket list -> Expected output: No buckets found for project xxx
    • stackit object-storage bucket list --output-format json -> expected: valid JSON output
    • stackit object-storage bucket list --output-format yaml -> expected: valid YAML output
  2. Create an object storage bucket: stackit object-storage bucket create my-bucket
  3. With an object storage bucket present in your project, verify the bucket list command output again:
    • stackit object-storage bucket list -> Expected output: Table showing the available object storage buckets
    • stackit object-storage bucket list --output-format json -> expected: valid JSON output
    • stackit object-storage bucket list --output-format yaml -> expected: valid YAML output
  4. Verify the output of the credentials group list command (FYI: it's not possible to verify this for the case where no object storage credentials group is present in the project because there's always a default group present)
    • stackit object-storage credentials-group list -> Expected output: Table showing the available object storage credentials groups
    • stackit object-storage credentials-group list --output-format json -> expected: valid JSON output
    • stackit object-storage credentials-group list --output-format yaml -> expected: valid YAML output
  5. Choose one from the existing credentials groups (with existing credentials in them) and verify the credentials list command for them:
    • stackit object-storage credentials list --credentials-group-id xxx -> Expected output: Table showing the available credentials
    • stackit object-storage credentials list --credentials-group-id xxx --output-format json -> expected: valid JSON output
    • stackit object-storage credentials list --credentials-group-id xxx --output-format yaml -> expected: valid YAML output
  6. Create a new credential group (stackit object-storage credentials-group create --name example), then verify the credential list command output for it again
    • stackit object-storage credentials list --credentials-group-id xxx -> Expected output: No credentials found for credentials group "example"
    • stackit object-storage credentials list --credentials-group-id xxx --output-format json -> expected: valid JSON output
    • stackit object-storage credentials list --credentials-group-id xxx --output-format yaml -> expected: valid YAML output
  7. Cleanup:
    • Delete the credentials group you created: stackit object-storage credentials-group delete xxx
    • Delete the object storage bucket: stackit object-storage bucket delete my-bucket

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 21, 2025 15:58
@rubenhoenle rubenhoenle self-assigned this Oct 21, 2025
@rubenhoenle rubenhoenle enabled auto-merge (squash) October 29, 2025 07:00
@rubenhoenle rubenhoenle force-pushed the fix/STACKITCLI-267-objectstorage-json-list branch from 57ef670 to 88fce00 Compare October 29, 2025 07:00
@rubenhoenle rubenhoenle force-pushed the fix/STACKITCLI-267-objectstorage-json-list branch from 88fce00 to 3820cf7 Compare October 29, 2025 07:22
@rubenhoenle rubenhoenle merged commit 03ca810 into main Oct 29, 2025
5 checks passed
@rubenhoenle rubenhoenle deleted the fix/STACKITCLI-267-objectstorage-json-list branch October 29, 2025 07:28
@github-actions
Copy link

Merging this branch changes the coverage (1 decrease, 2 increase)

Impacted Packages Coverage Δ 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/create 37.50% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/delete 28.21% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/describe 66.67% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/list 42.86% (-6.12%) 👎
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/create 55.26% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/delete 33.33% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/list 62.79% (+6.98%) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/create 57.69% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/delete 38.10% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/list 61.54% (+5.77%) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/disable 28.57% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/enable 28.57% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/list/list.go 42.86% (-6.12%) 49 21 (-3) 28 (+3) 👎
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/list/list.go 62.79% (+6.98%) 43 27 (+3) 16 (-3) 👍
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/list/list.go 61.54% (+5.77%) 52 32 (+3) 20 (-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/object-storage/bucket/create/create_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/delete/delete_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/describe/describe_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/list/list_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/create/create_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/delete/delete_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/list/list_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/create/create_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/delete/delete_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/list/list_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/disable/disable_test.go
  • github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/enable/enable_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