@@ -26,9 +26,7 @@ import (
26
26
"github.com/onsi/ginkgo/v2"
27
27
"github.com/onsi/gomega"
28
28
vmopv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha1"
29
- vmopv2 "github.com/vmware-tanzu/vm-operator/api/v1alpha2"
30
29
vmopv3 "github.com/vmware-tanzu/vm-operator/api/v1alpha3"
31
- vmopv4 "github.com/vmware-tanzu/vm-operator/api/v1alpha4"
32
30
v1 "k8s.io/api/core/v1"
33
31
storagev1 "k8s.io/api/storage/v1"
34
32
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -120,9 +118,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
120
118
}
121
119
vmopScheme := runtime .NewScheme ()
122
120
gomega .Expect (vmopv1 .AddToScheme (vmopScheme )).Should (gomega .Succeed ())
123
- gomega .Expect (vmopv2 .AddToScheme (vmopScheme )).Should (gomega .Succeed ())
124
121
gomega .Expect (vmopv3 .AddToScheme (vmopScheme )).Should (gomega .Succeed ())
125
- gomega .Expect (vmopv4 .AddToScheme (vmopScheme )).Should (gomega .Succeed ())
126
122
vmopClient , err = ctlrclient .New (f .ClientConfig (), ctlrclient.Options {Scheme : vmopScheme })
127
123
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
128
124
vmImageName := GetAndExpectStringEnvVar (envVmsvcVmImageName )
@@ -156,6 +152,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
156
152
157
153
if isVsanHealthServiceStopped {
158
154
ginkgo .By (fmt .Sprintln ("Starting vsan-health on the vCenter host" ))
155
+ vcAddress := e2eVSphere .Config .Global .VCenterHostname + ":" + sshdPort
159
156
err := invokeVCenterServiceControl (ctx , startOperation , vsanhealthServiceName , vcAddress )
160
157
gomega .Expect (err ).NotTo (gomega .HaveOccurred ())
161
158
ginkgo .By (fmt .Sprintf ("Sleeping for %v seconds to allow vsan-health to come up again" , vsanHealthServiceWaitTime ))
@@ -173,7 +170,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
173
170
3. Create PVC with EncryptionClass [2]
174
171
4. Validate PVC volume [3] is encrypted with encryption key [1]
175
172
*/
176
- ginkgo .It ("Verify PVC is encrypted with EncryptionClass" , func () {
173
+ ginkgo .It ("Verify PVC is encrypted with EncryptionClass" , ginkgo . Label ( p1 , wcp , vc90 ), func () {
177
174
ctx , cancel := context .WithCancel (context .Background ())
178
175
defer cancel ()
179
176
@@ -203,7 +200,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
203
200
3. Create a PVC with encrypted StorageClass but without specifying an EncryptionClass
204
201
4. Validate PVC volume [3] is encrypted with encryption key [1]
205
202
*/
206
- ginkgo .It ("Verify PVC is encrypted with default EncryptionClass" , func () {
203
+ ginkgo .It ("Verify PVC is encrypted with default EncryptionClass" , ginkgo . Label ( p1 , wcp , vc90 ), func () {
207
204
ctx , cancel := context .WithCancel (context .Background ())
208
205
defer cancel ()
209
206
@@ -236,7 +233,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
236
233
7. Update PVC with second EncryptionClass [4]
237
234
8. Validate PVC volume [5] is encrypted with second encryption key [2]
238
235
*/
239
- ginkgo .It ("Verify PVC is recrypted when a new EncryptionClass is applied" , func () {
236
+ ginkgo .It ("Verify PVC is recrypted when a new EncryptionClass is applied" , ginkgo . Label ( p1 , wcp , vc90 ), func () {
240
237
ctx , cancel := context .WithCancel (context .Background ())
241
238
defer cancel ()
242
239
@@ -283,7 +280,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
283
280
7. Validate PVC volume [4] is encrypted with second encryption key [2]
284
281
*/
285
282
ginkgo .It ("Verify PVC is recrypted when a new encryption key is applied to its " +
286
- "associated EncryptionClass" , func () {
283
+ "associated EncryptionClass" , ginkgo . Label ( p1 , wcp , vc90 ), func () {
287
284
ctx , cancel := context .WithCancel (context .Background ())
288
285
defer cancel ()
289
286
@@ -322,7 +319,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
322
319
3. Create PVC with EncryptionClass [2]
323
320
*/
324
321
ginkgo .It ("Verify PVC creation fails when associated with an EncryptionClass " +
325
- "but the StorageClass does not support encryption" , func () {
322
+ "but the StorageClass does not support encryption" , ginkgo . Label ( p1 , wcp , vc90 ), func () {
326
323
327
324
ctx , cancel := context .WithCancel (context .Background ())
328
325
defer cancel ()
@@ -357,7 +354,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
357
354
5. Validate VM [4] is encrypted with encryption key [1]
358
355
6. Validate PVC [3] is not encrypted
359
356
*/
360
- ginkgo .It ("Verify VM is encrypted with EncryptionClass while PVC is not encrypted" , func () {
357
+ ginkgo .It ("Verify VM is encrypted with EncryptionClass while PVC is not encrypted" , ginkgo . Label ( p1 , wcp , vc90 ), func () {
361
358
ctx , cancel := context .WithCancel (context .Background ())
362
359
defer cancel ()
363
360
@@ -405,7 +402,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
405
402
5. Validate VM [4] is encrypted with encryption key [1]
406
403
6. Validate PVC [3] is encrypted with encryption key [1]
407
404
*/
408
- ginkgo .It ("Verify VM and associated PVC are encrypted with EncryptionClass" , func () {
405
+ ginkgo .It ("Verify VM and associated PVC are encrypted with EncryptionClass" , ginkgo . Label ( p1 , wcp , vc90 ), func () {
409
406
ctx , cancel := context .WithCancel (context .Background ())
410
407
defer cancel ()
411
408
@@ -454,7 +451,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
454
451
5. Validate VM [4] is encrypted with encryption key [1]
455
452
6. Validate PVC [3] is encrypted with encryption key [1]
456
453
*/
457
- ginkgo .It ("Verify VM and associated PVC are encrypted with default EncryptionClass" , func () {
454
+ ginkgo .It ("Verify VM and associated PVC are encrypted with default EncryptionClass" , ginkgo . Label ( p1 , wcp , vc90 ), func () {
458
455
ctx , cancel := context .WithCancel (context .Background ())
459
456
defer cancel ()
460
457
@@ -505,7 +502,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
505
502
11. Validate PVC [5] is encrypted with second encryption key [2]
506
503
12. Validate VM [6] is encrypted with first encryption key [1]
507
504
*/
508
- ginkgo .It ("Verify VM and attached PVC are encrypted/recrypted with different keys" , func () {
505
+ ginkgo .It ("Verify VM and attached PVC are encrypted/recrypted with different keys" , ginkgo . Label ( p1 , wcp , vc90 ), func () {
509
506
ctx , cancel := context .WithCancel (context .Background ())
510
507
defer cancel ()
511
508
@@ -577,7 +574,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
577
574
9. Bring vsan-service up
578
575
10. Validate PVC volume [5] is encrypted with second encryption key [2]
579
576
*/
580
- ginkgo .It ("Verify PVC encryption when vsan-health is down" , func () {
577
+ ginkgo .It ("Verify PVC encryption when vsan-health is down" , ginkgo . Label ( p1 , wcp , negative , vc90 ), func () {
581
578
ctx , cancel := context .WithCancel (context .Background ())
582
579
defer cancel ()
583
580
@@ -607,6 +604,7 @@ var _ = ginkgo.Describe("[csi-supervisor] [encryption] Block volume encryption",
607
604
validateVolumeToBeEncryptedWithKey (ctx , pvc .Spec .VolumeName , keyProviderID , keyID1 )
608
605
609
606
ginkgo .By ("7. Stop Vsan-health service" )
607
+ vcAddress := e2eVSphere .Config .Global .VCenterHostname + ":" + sshdPort
610
608
ginkgo .By (fmt .Sprintln ("Stopping vsan-health on the vCenter host" ))
611
609
isVsanHealthServiceStopped = true
612
610
err := invokeVCenterServiceControl (ctx , stopOperation , vsanhealthServiceName , vcAddress )
0 commit comments