Skip to content

Commit a96d950

Browse files
committed
Add error case for test coverage
1 parent 06b1375 commit a96d950

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pkg/resource-handler/controller/shard/shard_controller_internal_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,22 @@ func TestReconcile_InvalidScheme(t *testing.T) {
188188
return r.reconcilePoolHeadlessService(ctx, shard, "pool1", "", poolSpec)
189189
},
190190
},
191+
"PoolBackupPVC": {
192+
setupShard: func() *multigresv1alpha1.Shard {
193+
return &multigresv1alpha1.Shard{
194+
ObjectMeta: metav1.ObjectMeta{
195+
Name: "test-shard",
196+
Namespace: "default",
197+
},
198+
}
199+
},
200+
reconcileFunc: func(r *ShardReconciler, ctx context.Context, shard *multigresv1alpha1.Shard) error {
201+
poolSpec := multigresv1alpha1.PoolSpec{
202+
Cells: []multigresv1alpha1.CellName{"cell1"},
203+
}
204+
return r.reconcilePoolBackupPVC(ctx, shard, "pool1", "cell1", poolSpec)
205+
},
206+
},
191207
}
192208

193209
for name, tc := range tests {

0 commit comments

Comments
 (0)