@@ -29,9 +29,10 @@ import (
29
29
)
30
30
31
31
type PodDetails struct {
32
- Cmd string
33
- Volumes []VolumeDetails
34
- IsWindows bool
32
+ Cmd string
33
+ Volumes []VolumeDetails
34
+ IsWindows bool
35
+ WinServerVer string
35
36
}
36
37
37
38
type VolumeDetails struct {
@@ -86,7 +87,7 @@ type DataSource struct {
86
87
87
88
//nolint:dupl
88
89
func (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 )
90
91
cleanupFuncs := make ([]func (ctx context.Context ), 0 )
91
92
for n , v := range pod .Volumes {
92
93
tpvc , funcs := v .SetupDynamicPersistentVolumeClaim (ctx , client , namespace , csiDriver , storageClassParameters )
@@ -104,7 +105,7 @@ func (pod *PodDetails) SetupWithDynamicVolumes(ctx context.Context, client clien
104
105
//
105
106
//nolint:dupl
106
107
func (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 )
108
109
cleanupFuncs := make ([]func (ctx context.Context ), 0 )
109
110
for n , v := range pod .Volumes {
110
111
tpvc , funcs := v .SetupDynamicPersistentVolumeClaim (ctx , client , namespace , csiDriver , storageClassParameters )
@@ -119,7 +120,7 @@ func (pod *PodDetails) SetupWithDynamicMultipleVolumes(ctx context.Context, clie
119
120
}
120
121
121
122
func (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 )
123
124
cleanupFuncs := make ([]func (ctx context.Context ), 0 )
124
125
for n , v := range pod .Volumes {
125
126
tpvc , funcs := v .SetupPreProvisionedPersistentVolumeClaim (ctx , client , namespace , csiDriver )
@@ -149,14 +150,14 @@ func (pod *PodDetails) SetupDeployment(ctx context.Context, client clientset.Int
149
150
tpvc .ValidateProvisionedPersistentVolume (ctx )
150
151
cleanupFuncs = append (cleanupFuncs , tpvc .Cleanup )
151
152
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 )
153
154
154
155
cleanupFuncs = append (cleanupFuncs , tDeployment .Cleanup )
155
156
return tDeployment , cleanupFuncs
156
157
}
157
158
158
159
func (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 )
160
161
cleanupFuncs := make ([]func (ctx context.Context ), 0 )
161
162
for n , v := range pod .Volumes {
162
163
tpvc , funcs := v .SetupDynamicPersistentVolumeClaim (ctx , client , namespace , csiDriver , storageClassParameters )
0 commit comments