@@ -3,22 +3,26 @@ package controllers
33import (
44 "context"
55
6- mfc "github.com/manifestival/controller-runtime-client"
7- mf "github.com/manifestival/manifestival"
86 . "github.com/onsi/ginkgo/v2"
97 . "github.com/onsi/gomega"
8+
9+ mfc "github.com/manifestival/controller-runtime-client"
10+ mf "github.com/manifestival/manifestival"
11+
1012 codeflarev1alpha1 "github.com/project-codeflare/codeflare-operator/api/v1alpha1"
1113)
1214
1315const (
1416 instascaleCRCase1 = "./testdata/instascale_test_cases/case_1.yaml"
1517 instascaleCRCase2 = "./testdata/instascale_test_cases/case_2.yaml"
18+ instascaleCRCase3 = "./testdata/instascale_test_cases/case_3.yaml"
1619 instascaleConfigMap1 = "./testdata/instascale_test_results/case_1/configmap.yaml"
1720 instascaleServiceAccount1 = "./testdata/instascale_test_results/case_1/serviceaccount.yaml"
1821 instascaleClusterRole1 = "./testdata/instascale_test_results/case_1/clusterrole.yaml"
1922 instascaleClusterRoleBinding1 = "./testdata/instascale_test_results/case_1/clusterrolebinding.yaml"
2023 instascaleDeployment1 = "./testdata/instascale_test_results/case_1/deployment.yaml"
2124 instascaleDeployment2 = "./testdata/instascale_test_results/case_2/deployment.yaml"
25+ instascaleDeployment3 = "./testdata/instascale_test_results/case_3/deployment.yaml"
2226)
2327
2428func deployInstaScale (ctx context.Context , path string , opts mf.Option ) {
@@ -44,11 +48,20 @@ var _ = Describe("The Instascale Controller", func() {
4448 compareClusterRoleBindings (instascaleClusterRoleBinding1 , opts )
4549 })
4650 })
51+
4752 Context ("In a namespace, InstaScale ControllerResources is given" , func () {
4853
4954 It ("It should deploy InstaScale with the given ControllerResources" , func () {
5055 deployInstaScale (ctx , instascaleCRCase2 , opts )
5156 compareDeployments (instascaleDeployment2 , opts )
5257 })
5358 })
59+
60+ Context ("When an InstaScale resource with a custom image is given" , func () {
61+
62+ It ("It should deploy InstaScale with the given controller image" , func () {
63+ deployInstaScale (ctx , instascaleCRCase3 , opts )
64+ compareDeployments (instascaleDeployment3 , opts )
65+ })
66+ })
5467})
0 commit comments