@@ -47,7 +47,7 @@ const (
4747)
4848
4949// Actual test suite.
50- var _ = Describe ("NIM Operator" , func () {
50+ var _ = Describe ("NIM Operator" , Ordered , func () {
5151
5252 AfterEach (func (ctx context.Context ) {
5353 // Run diagnostic collector if test failed
@@ -66,46 +66,45 @@ var _ = Describe("NIM Operator", func() {
6666 }
6767 })
6868
69- When ("deploying the K8s-NIM-Operator via Helm" , Ordered , func () {
70- It ("should be successful" , func (ctx context.Context ) {
71- // Add or Update Helm repo
72- helmRepo := repo.Entry {
73- Name : "nvidia" ,
74- URL : nvidiaHelm ,
75- }
76- err := helmClient .AddOrUpdateChartRepo (helmRepo )
77- Expect (err ).NotTo (HaveOccurred ())
69+ BeforeAll (func () {
70+ // Add or Update Helm repo
71+ helmRepo := repo.Entry {
72+ Name : "nvidia" ,
73+ URL : nvidiaHelm ,
74+ }
75+ err := helmClient .AddOrUpdateChartRepo (helmRepo )
76+ Expect (err ).NotTo (HaveOccurred ())
7877
79- err = helmClient .UpdateChartRepos ()
80- Expect (err ).NotTo (HaveOccurred ())
78+ err = helmClient .UpdateChartRepos ()
79+ Expect (err ).NotTo (HaveOccurred ())
8180
82- pullSecrets := []string {"ngc-secret" }
83- // Values
84- values := helmValues.Options {
85- Values : []string {
86- fmt .Sprintf ("operator.image.repository=%s" , ImageRepo ),
87- fmt .Sprintf ("operator.image.tag=%s" , ImageTag ),
88- fmt .Sprintf ("operator.image.pullPolicy=%s" , ImagePullPolicy ),
89- fmt .Sprintf ("operator.image.pullSecrets={%s}" , strings .Join (pullSecrets , "," )),
90- },
91- }
81+ pullSecrets := []string {"ngc-secret" }
82+ // Values
83+ values := helmValues.Options {
84+ Values : []string {
85+ fmt .Sprintf ("operator.image.repository=%s" , ImageRepo ),
86+ fmt .Sprintf ("operator.image.tag=%s" , ImageTag ),
87+ fmt .Sprintf ("operator.image.pullPolicy=%s" , ImagePullPolicy ),
88+ fmt .Sprintf ("operator.image.pullSecrets={%s}" , strings .Join (pullSecrets , "," )),
89+ fmt .Sprintf ("operator.admissionController.enabled=%t" , AdmissionControllerEnabled ),
90+ },
91+ }
9292
93- // Chart spec
94- chartSpec := & helm.ChartSpec {
95- ReleaseName : helmReleaseName ,
96- ChartName : helmChart ,
97- Namespace : testNamespace .Name ,
98- CreateNamespace : true ,
99- Wait : true ,
100- Timeout : 10 * time .Minute , // pull time is long
101- ValuesOptions : values ,
102- CleanupOnFail : true ,
103- }
93+ // Chart spec
94+ chartSpec := & helm.ChartSpec {
95+ ReleaseName : helmReleaseName ,
96+ ChartName : helmChart ,
97+ Namespace : testNamespace .Name ,
98+ CreateNamespace : true ,
99+ Wait : true ,
100+ Timeout : 10 * time .Minute , // pull time is long
101+ ValuesOptions : values ,
102+ CleanupOnFail : true ,
103+ }
104104
105- By ("Installing k8s-nim-operator Helm chart" )
106- _ , err = helmClient .InstallOrUpgradeChart (ctx , chartSpec , nil )
107- Expect (err ).NotTo (HaveOccurred ())
108- })
105+ By ("Installing k8s-nim-operator Helm chart" )
106+ _ , err = helmClient .InstallOrUpgradeChart (ctx , chartSpec , nil )
107+ Expect (err ).NotTo (HaveOccurred ())
109108 })
110109
111110 When ("deploying NIMCache and NIMService" , Ordered , func () {
0 commit comments