Skip to content

Commit 8ff9d12

Browse files
committed
test: improve chaos test
1 parent 1ac1b29 commit 8ff9d12

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/chaos/helpers_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ func runOperatorDeletionChaos(rng *rand.Rand, namespace, clusterName string) str
122122
deleted, err := framework.DeleteRandomRedisPods(ctx, k8sClientset, namespace, clusterName, 2, rng)
123123
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("iteration %d/%d: failed to delete random redis pods", i, chaosIterations))
124124
Expect(deleted).NotTo(BeEmpty(), fmt.Sprintf("iteration %d/%d: expected at least one redis pod deletion", i, chaosIterations))
125+
GinkgoWriter.Printf("Deleted pods: %v\n", deleted)
125126

126127
By(fmt.Sprintf("iteration %d/%d: waiting for recovery", i, chaosIterations))
127128
Expect(framework.WaitForChaosReady(ctx, dynamicClient, k8sClientset, namespace, clusterName, chaosReadyTimeout)).To(Succeed(),
@@ -158,6 +159,7 @@ func runRobinDeletionChaos(rng *rand.Rand, namespace, clusterName string) string
158159
deletedRedis, err := framework.DeleteRandomRedisPods(ctx, k8sClientset, namespace, clusterName, 2, rng)
159160
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("iteration %d/%d: failed to delete random redis pods", i, chaosIterations))
160161
Expect(deletedRedis).NotTo(BeEmpty(), fmt.Sprintf("iteration %d/%d: expected at least one redis pod deletion", i, chaosIterations))
162+
GinkgoWriter.Printf("Deleted pods: %v\n", deletedRedis)
161163

162164
By(fmt.Sprintf("iteration %d/%d: waiting for recovery", i, chaosIterations))
163165
Expect(framework.WaitForChaosReady(ctx, dynamicClient, k8sClientset, namespace, clusterName, chaosReadyTimeout)).To(Succeed(),
@@ -209,6 +211,7 @@ func runFullChaos(rng *rand.Rand, namespace, clusterName string) string {
209211
deleted, err := framework.DeleteRandomRedisPods(ctx, k8sClientset, namespace, clusterName, 2, rng)
210212
Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("iteration %d/%d: failed to delete random redis pods", i, chaosIterations))
211213
Expect(deleted).NotTo(BeEmpty(), fmt.Sprintf("iteration %d/%d: expected at least one redis pod deletion", i, chaosIterations))
214+
GinkgoWriter.Printf("Deleted pods: %v\n", deleted)
212215
}
213216

214217
if rng.Intn(2) == 0 {

0 commit comments

Comments
 (0)