Skip to content

Commit

Permalink
test: added assertions for dyamic nim resources name
Browse files Browse the repository at this point in the history
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
  • Loading branch information
TomerFi committed Dec 23, 2024
1 parent 9ddf8d7 commit 8e9d0b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/controller/nim/account_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,19 @@ var _ = Describe("NIM Account Controller Test Cases", func() {
dataCmap := &corev1.ConfigMap{}
dataCmapSubject := namespacedNameFromReference(account.Status.NIMConfig)
Expect(k8sClient.Get(ctx, dataCmapSubject, dataCmap)).To(Succeed())
Expect(dataCmapSubject.Name).To(HavePrefix(account.Name + "-"))
Expect(dataCmap.OwnerReferences[0]).To(Equal(expectedOwner))

runtimeTemplate := &templatev1.Template{}
runtimeTemplateSubject := namespacedNameFromReference(account.Status.RuntimeTemplate)
Expect(k8sClient.Get(ctx, runtimeTemplateSubject, runtimeTemplate)).To(Succeed())
Expect(runtimeTemplateSubject.Name).To(HavePrefix(account.Name + "-"))
Expect(runtimeTemplate.OwnerReferences[0]).To(Equal(expectedOwner))

pullSecret := &corev1.Secret{}
pullSecretSubject := namespacedNameFromReference(account.Status.NIMPullSecret)
Expect(k8sClient.Get(ctx, pullSecretSubject, pullSecret)).To(Succeed())
Expect(pullSecretSubject.Name).To(HavePrefix(account.Name + "-"))
Expect(pullSecret.OwnerReferences[0]).To(Equal(expectedOwner))

By("Verify models info")
Expand Down

0 comments on commit 8e9d0b6

Please sign in to comment.