Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
Signed-off-by: YZ775 <[email protected]>
  • Loading branch information
YZ775 committed Aug 23, 2023
1 parent 100f201 commit fff0b16
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion e2e/lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ var _ = Context("lifecycle", func() {
if conditionHealthy == nil {
return fmt.Errorf("cluster is not healthy")
}
if conditionReconcileSuccess.Status != metav1.ConditionTrue && conditionStatefulSetReady.Status != metav1.ConditionTrue && conditionHealthy.Status != metav1.ConditionTrue {
if conditionReconcileSuccess.Status != metav1.ConditionTrue {
return fmt.Errorf("cluster is not ready")
}
if conditionStatefulSetReady.Status != metav1.ConditionTrue {
return fmt.Errorf("cluster is not ready")
}
if conditionHealthy.Status != metav1.ConditionTrue {
return fmt.Errorf("cluster is not ready")
}
return nil
Expand Down
8 changes: 7 additions & 1 deletion e2e/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,13 @@ var _ = Context("upgrade", func() {
if conditionHealthy == nil {
return fmt.Errorf("cluster is not healthy")
}
if conditionReconcileSuccess.Status != metav1.ConditionTrue && conditionStatefulSetReady.Status != metav1.ConditionTrue && conditionHealthy.Status != metav1.ConditionTrue {
if conditionReconcileSuccess.Status != metav1.ConditionTrue {
return fmt.Errorf("cluster is not ready")
}
if conditionStatefulSetReady.Status != metav1.ConditionTrue {
return fmt.Errorf("cluster is not ready")
}
if conditionHealthy.Status != metav1.ConditionTrue {
return fmt.Errorf("cluster is not ready")
}
return nil
Expand Down

0 comments on commit fff0b16

Please sign in to comment.