Skip to content

chore: avoid redis create test panic - #695

Merged
ldming merged 1 commit into
mainfrom
support/fix-redis-ci
Jul 14, 2026
Merged

chore: avoid redis create test panic#695
ldming merged 1 commit into
mainfrom
support/fix-redis-ci

Conversation

@ldming

@ldming ldming commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • assert the Redis chart’s stable clusterDef output instead of indexing an optional component-definition list
  • remove the obsolete component-definition test constant

Root cause

The Redis create test indexed ChartInfo.ComponentDef[0]. In CI the list was empty for a valid rendered Redis cluster, causing an index-out-of-range panic. The rendered chart always identifies the cluster through clusterDef: redis.

Validation

  • go test ./pkg/cmd/cluster -run '^TestCluster$' -count=1 -ginkgo.focus='create sharding cluster command'\n- go test ./... -coverprofile=coverage.txt\n- golangci-lint run --timeout=5m ./pkg/cmd/cluster/...

@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-9 lines. label Jul 14, 2026
@ldming ldming changed the title fix: avoid redis create test panic chore: avoid redis create test panic Jul 14, 2026
@ldming
ldming marked this pull request as ready for review July 14, 2026 09:25
@ldming
ldming merged commit 6841e8b into main Jul 14, 2026
22 of 24 checks passed
@ldming
ldming deleted the support/fix-redis-ci branch July 14, 2026 09:45
@github-actions github-actions Bot added this to the Release 1.0 milestone Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant