From 87a6abcb996f9be974fb0708a2ca0d93824d6d19 Mon Sep 17 00:00:00 2001 From: tariq-hasan Date: Thu, 25 Apr 2024 23:57:31 -0400 Subject: [PATCH] Ordered test cases in TestGetRunSpecWithHPConfigMap Signed-off-by: tariq-hasan --- .../experiment/manifest/generator_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/controller.v1beta1/experiment/manifest/generator_test.go b/pkg/controller.v1beta1/experiment/manifest/generator_test.go index a2b9f295f0e..c4ee3abde3f 100644 --- a/pkg/controller.v1beta1/experiment/manifest/generator_test.go +++ b/pkg/controller.v1beta1/experiment/manifest/generator_test.go @@ -312,7 +312,15 @@ spec: }, } - for name, tc := range cases { + testCaseNames := []string{ + "Run with valid parameters", + "Invalid ConfigMap name", + "Invalid template path in ConfigMap name", + "Invalid trial spec in ConfigMap", + } + + for _, name := range testCaseNames { + tc := cases[name] t.Run(name, func(t *testing.T) { got, err := p.GetRunSpecWithHyperParameters(tc.Instance, "trial-name", "trial-namespace", tc.ParameterAssignments) if diff := cmp.Diff(tc.wantError, err, cmpopts.EquateErrors()); len(diff) != 0 {