Skip to content

Commit

Permalink
Using MatchCondition instead since there are more conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiz Filho committed Oct 19, 2023
1 parent 13cc5c3 commit be9adf0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions controllers/leveltriggered/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,7 @@ func checkReadyCondition(ctx context.Context, g Gomega, n types.NamespacedName,
Reason: reason,
}

fmt.Println(&pipeline.Status.Conditions)

assrt.Should(conditions.MatchConditions([]metav1.Condition{cond}))
assrt.Should(conditions.MatchCondition(cond))
}

func checkPendingCondition(ctx context.Context, g Gomega, n types.NamespacedName, status metav1.ConditionStatus, reason string) {
Expand All @@ -401,7 +399,7 @@ func checkPendingCondition(ctx context.Context, g Gomega, n types.NamespacedName
Reason: reason,
}

assrt.Should(conditions.MatchConditions([]metav1.Condition{cond}))
assrt.Should(conditions.MatchCondition(cond))
}

func newPipeline(ctx context.Context, g Gomega, name string, ns string, clusters []*clusterctrlv1alpha1.GitopsCluster) *v1alpha1.Pipeline {
Expand Down

0 comments on commit be9adf0

Please sign in to comment.