Skip to content

Commit

Permalink
test(webhook): add UT deleted by accident.
Browse files Browse the repository at this point in the history
Signed-off-by: Electronic-Waste <[email protected]>
  • Loading branch information
Electronic-Waste committed Aug 16, 2024
1 parent b4872e1 commit 39ee77f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/webhook/v1beta1/pod/inject_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,21 @@ func TestGetMetricsCollectorArgs(t *testing.T) {
"-s-earlystop", katibEarlyStopAddress,
},
},
"Trial with invalid Experiment label name. Suggestion is not created": {
trial: func() *trialsv1beta1.Trial {
trial := testTrial.DeepCopy()
trial.ObjectMeta.Labels[consts.LabelExperimentName] = "invalid-name"
return trial
}(),
mCSpec: common.MetricsCollectorSpec{
Collector: &common.CollectorSpec{
Kind: common.StdOutCollector,
},
},
earlyStoppingRules: earlyStoppingRules,
katibConfig: configv1beta1.MetricsCollectorConfig{},
err: true,
},
}

g.Expect(c.Create(context.TODO(), testSuggestion)).NotTo(gomega.HaveOccurred())
Expand Down

0 comments on commit 39ee77f

Please sign in to comment.