-
Notifications
You must be signed in to change notification settings - Fork 485
Closed
Labels
area/testinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededkind/feature
Description
What you would like to be added?
Use the propagated gomega instance in replace of func() bool
, like code here:
katib/pkg/controller.v1beta1/trial/trial_controller_test.go
Lines 303 to 314 in bc09cfd
// Expect that Trial status is succeeded with "false" status and "metrics unavailable" reason. | |
// Metrics unavailable because GetTrialObservationLog returns "unavailable". | |
g.Eventually(func() bool { | |
if err = c.Get(ctx, trialKey, trial); err != nil { | |
return false | |
} | |
return trial.IsMetricsUnavailable() && | |
len(trial.Status.Observation.Metrics) > 0 && | |
trial.Status.Observation.Metrics[0].Min == consts.UnavailableMetricValue && | |
trial.Status.Observation.Metrics[0].Max == consts.UnavailableMetricValue && | |
trial.Status.Observation.Metrics[0].Latest == consts.UnavailableMetricValue | |
}, timeout).Should(gomega.BeTrue()) |
Why is this needed?
As @tenzen-y described in #2394 (comment), it will improve the debuggability of the UTs.
Love this feature?
Give it a 👍 We prioritize the features with most 👍
Electronic-Waste and tenzen-y
Metadata
Metadata
Assignees
Labels
area/testinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededkind/feature