Skip to content

Commit c103a0d

Browse files
Update internal/controller/platform/standalone/nimservice_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ab95deb commit c103a0d

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

internal/controller/platform/standalone/nimservice_test.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,15 +1410,10 @@ var _ = Describe("NIMServiceReconciler for a standalone platform", func() {
14101410

14111411
// Verify that NIM_MODEL_NAME environment variable is added
14121412
container := deployment.Spec.Template.Spec.Containers[0]
1413-
var nimModelNameEnv *corev1.EnvVar
1414-
for _, env := range container.Env {
1415-
if env.Name == "NIM_MODEL_NAME" {
1416-
nimModelNameEnv = &env
1417-
break
1418-
}
1419-
}
1420-
Expect(nimModelNameEnv).NotTo(BeNil(), "NIM_MODEL_NAME environment variable should be present")
1421-
Expect(nimModelNameEnv.Value).To(Equal("/model-store"), "NIM_MODEL_NAME should be set to /model-store")
1413+
Expect(container.Env).To(ContainElement(MatchFields(IgnoreExtras, Fields{
1414+
"Name": Equal("NIM_MODEL_NAME"),
1415+
"Value": Equal("/model-store"),
1416+
})), "NIM_MODEL_NAME environment variable should be present and set to /model-store")
14221417

14231418
// Verify that other environment variables are still present
14241419
var customEnv *corev1.EnvVar

0 commit comments

Comments
 (0)