@@ -3,22 +3,26 @@ package controllers
3
3
import (
4
4
"context"
5
5
6
- mfc "github.com/manifestival/controller-runtime-client"
7
- mf "github.com/manifestival/manifestival"
8
6
. "github.com/onsi/ginkgo/v2"
9
7
. "github.com/onsi/gomega"
8
+
9
+ mfc "github.com/manifestival/controller-runtime-client"
10
+ mf "github.com/manifestival/manifestival"
11
+
10
12
codeflarev1alpha1 "github.com/project-codeflare/codeflare-operator/api/v1alpha1"
11
13
)
12
14
13
15
const (
14
16
instascaleCRCase1 = "./testdata/instascale_test_cases/case_1.yaml"
15
17
instascaleCRCase2 = "./testdata/instascale_test_cases/case_2.yaml"
18
+ instascaleCRCase3 = "./testdata/instascale_test_cases/case_3.yaml"
16
19
instascaleConfigMap1 = "./testdata/instascale_test_results/case_1/configmap.yaml"
17
20
instascaleServiceAccount1 = "./testdata/instascale_test_results/case_1/serviceaccount.yaml"
18
21
instascaleClusterRole1 = "./testdata/instascale_test_results/case_1/clusterrole.yaml"
19
22
instascaleClusterRoleBinding1 = "./testdata/instascale_test_results/case_1/clusterrolebinding.yaml"
20
23
instascaleDeployment1 = "./testdata/instascale_test_results/case_1/deployment.yaml"
21
24
instascaleDeployment2 = "./testdata/instascale_test_results/case_2/deployment.yaml"
25
+ instascaleDeployment3 = "./testdata/instascale_test_results/case_3/deployment.yaml"
22
26
)
23
27
24
28
func deployInstaScale (ctx context.Context , path string , opts mf.Option ) {
@@ -44,11 +48,20 @@ var _ = Describe("The Instascale Controller", func() {
44
48
compareClusterRoleBindings (instascaleClusterRoleBinding1 , opts )
45
49
})
46
50
})
51
+
47
52
Context ("In a namespace, InstaScale ControllerResources is given" , func () {
48
53
49
54
It ("It should deploy InstaScale with the given ControllerResources" , func () {
50
55
deployInstaScale (ctx , instascaleCRCase2 , opts )
51
56
compareDeployments (instascaleDeployment2 , opts )
52
57
})
53
58
})
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
+ })
54
67
})
0 commit comments