Skip to content

Conversation

@rubenhoenle
Copy link
Member

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

@rubenhoenlerubenhoenle requested a review from a team as a code ownerOctober 21, 2025 15:58
@rubenhoenlerubenhoenle self-assigned this Oct 21, 2025
@rubenhoenlerubenhoenle enabled auto-merge (squash) October 29, 2025 07:00
@rubenhoenlerubenhoenleforce-pushed the fix/STACKITCLI-267-objectstorage-json-list branch from 57ef670 to 88fce00CompareOctober 29, 2025 07:00
@rubenhoenlerubenhoenleforce-pushed the fix/STACKITCLI-267-objectstorage-json-list branch from 88fce00 to 3820cf7CompareOctober 29, 2025 07:22
@rubenhoenlerubenhoenle merged commit 03ca810 into mainOct 29, 2025
5 checks passed
@rubenhoenlerubenhoenle 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 PackagesCoverage Δ🤖
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/create37.50% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/delete28.21% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/describe66.67% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/list42.86% (-6.12%)👎
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/create55.26% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/delete33.33% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/list62.79% (+6.98%)👍
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/create57.69% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/delete38.10% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/list61.54% (+5.77%)👍
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/disable28.57% (ø)
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/enable28.57% (ø)

Coverage by file

Changed files (no unit tests)

Changed FileCoverage ΔTotalCoveredMissed🤖
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/bucket/list/list.go42.86% (-6.12%)4921 (-3)28 (+3)👎
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials-group/list/list.go62.79% (+6.98%)4327 (+3)16 (-3)👍
github.com/stackitcloud/stackit-cli/internal/cmd/object-storage/credentials/list/list.go61.54% (+5.77%)5232 (+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 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