Skip to content

Commit

Permalink
fix checkJobSetStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvegamyhre committed May 7, 2023
1 parent a295a9d commit c176aa7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ func checkJobSetStatus(ctx context.Context, k8sClient client.Client, js *jobset.
if err := k8sClient.Get(ctx, types.NamespacedName{Namespace: js.Namespace, Name: js.Name}, &fetchedJS); err != nil {
return false, err
}
found := 0
for _, want := range conditions {
for _, c := range fetchedJS.Status.Conditions {
if c.Type == want.Type && c.Status == want.Status {
return true, nil
found += 1
}
}
}
return len(conditions) == len(fetchedJS.Status.Conditions), nil
return found == len(conditions), nil
}

0 comments on commit c176aa7

Please sign in to comment.