@@ -29,9 +29,10 @@ import (
2929)
3030
3131type PodDetails struct {
32- Cmd string
33- Volumes []VolumeDetails
34- IsWindows bool
32+ Cmd string
33+ Volumes []VolumeDetails
34+ IsWindows bool
35+ WinServerVer string
3536}
3637
3738type VolumeDetails struct {
@@ -86,7 +87,7 @@ type DataSource struct {
8687
8788//nolint:dupl
8889func (pod * PodDetails ) SetupWithDynamicVolumes (ctx context.Context , client clientset.Interface , namespace * v1.Namespace , csiDriver driver.DynamicPVTestDriver , storageClassParameters map [string ]string ) (* TestPod , []func (ctx context.Context )) {
89- tpod := NewTestPod (client , namespace , pod .Cmd , pod .IsWindows )
90+ tpod := NewTestPod (client , namespace , pod .Cmd , pod .IsWindows , pod . WinServerVer )
9091 cleanupFuncs := make ([]func (ctx context.Context ), 0 )
9192 for n , v := range pod .Volumes {
9293 tpvc , funcs := v .SetupDynamicPersistentVolumeClaim (ctx , client , namespace , csiDriver , storageClassParameters )
@@ -104,7 +105,7 @@ func (pod *PodDetails) SetupWithDynamicVolumes(ctx context.Context, client clien
104105//
105106//nolint:dupl
106107func (pod * PodDetails ) SetupWithDynamicMultipleVolumes (ctx context.Context , client clientset.Interface , namespace * v1.Namespace , csiDriver driver.DynamicPVTestDriver , storageClassParameters map [string ]string ) (* TestPod , []func (ctx context.Context )) {
107- tpod := NewTestPod (client , namespace , pod .Cmd , pod .IsWindows )
108+ tpod := NewTestPod (client , namespace , pod .Cmd , pod .IsWindows , pod . WinServerVer )
108109 cleanupFuncs := make ([]func (ctx context.Context ), 0 )
109110 for n , v := range pod .Volumes {
110111 tpvc , funcs := v .SetupDynamicPersistentVolumeClaim (ctx , client , namespace , csiDriver , storageClassParameters )
@@ -119,7 +120,7 @@ func (pod *PodDetails) SetupWithDynamicMultipleVolumes(ctx context.Context, clie
119120}
120121
121122func (pod * PodDetails ) SetupWithPreProvisionedVolumes (ctx context.Context , client clientset.Interface , namespace * v1.Namespace , csiDriver driver.PreProvisionedVolumeTestDriver ) (* TestPod , []func (ctx context.Context )) {
122- tpod := NewTestPod (client , namespace , pod .Cmd , pod .IsWindows )
123+ tpod := NewTestPod (client , namespace , pod .Cmd , pod .IsWindows , pod . WinServerVer )
123124 cleanupFuncs := make ([]func (ctx context.Context ), 0 )
124125 for n , v := range pod .Volumes {
125126 tpvc , funcs := v .SetupPreProvisionedPersistentVolumeClaim (ctx , client , namespace , csiDriver )
@@ -149,14 +150,14 @@ func (pod *PodDetails) SetupDeployment(ctx context.Context, client clientset.Int
149150 tpvc .ValidateProvisionedPersistentVolume (ctx )
150151 cleanupFuncs = append (cleanupFuncs , tpvc .Cleanup )
151152 ginkgo .By ("setting up the Deployment" )
152- tDeployment := NewTestDeployment (client , namespace , pod .Cmd , tpvc .persistentVolumeClaim , fmt .Sprintf ("%s%d" , volume .VolumeMount .NameGenerate , 1 ), fmt .Sprintf ("%s%d" , volume .VolumeMount .MountPathGenerate , 1 ), volume .VolumeMount .ReadOnly , pod .IsWindows )
153+ tDeployment := NewTestDeployment (client , namespace , pod .Cmd , tpvc .persistentVolumeClaim , fmt .Sprintf ("%s%d" , volume .VolumeMount .NameGenerate , 1 ), fmt .Sprintf ("%s%d" , volume .VolumeMount .MountPathGenerate , 1 ), volume .VolumeMount .ReadOnly , pod .IsWindows , pod . WinServerVer )
153154
154155 cleanupFuncs = append (cleanupFuncs , tDeployment .Cleanup )
155156 return tDeployment , cleanupFuncs
156157}
157158
158159func (pod * PodDetails ) SetupWithDynamicVolumesWithSubpath (ctx context.Context , client clientset.Interface , namespace * v1.Namespace , csiDriver driver.DynamicPVTestDriver , storageClassParameters map [string ]string ) (* TestPod , []func (ctx context.Context )) {
159- tpod := NewTestPod (client , namespace , pod .Cmd , pod .IsWindows )
160+ tpod := NewTestPod (client , namespace , pod .Cmd , pod .IsWindows , pod . WinServerVer )
160161 cleanupFuncs := make ([]func (ctx context.Context ), 0 )
161162 for n , v := range pod .Volumes {
162163 tpvc , funcs := v .SetupDynamicPersistentVolumeClaim (ctx , client , namespace , csiDriver , storageClassParameters )
0 commit comments