Skip to content

Commit c50c81e

Browse files
committed
chore: stabilize redis sharding create test
1 parent d70676f commit c50c81e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎pkg/cmd/cluster/create_subcmds_test.go‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ var _ = Describe("create cluster by cluster type", func() {
164164
Expect(o.Complete(shardCmd)).Should(Succeed())
165165
Expect(o.Name).ShouldNot(BeEmpty())
166166
Expect(o.Values).ShouldNot(BeNil())
167-
Expect(o.ChartInfo.ComponentDef[0]).Should(Equal(redisComponent))
167+
Expect(o.ChartInfo.ClusterDef).Should(Equal(redisCluster))
168+
if len(o.ChartInfo.ComponentDef) > 0 {
169+
Expect(o.ChartInfo.ComponentDef).Should(ContainElement(redisComponent))
170+
}
168171

169172
By("validate")
170173
o.Dynamic = testing.FakeDynamicClient()

0 commit comments

Comments
 (0)