Skip to content

Commit 9305495

Browse files
authored
Merge pull request kubernetes#111859 from omertuc/fixparallelclosure2
Fix failing `test/e2e/storage/csi_mock_volume.go` test
2 parents 619f1cf + 44a5971 commit 9305495

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/e2e/storage/csi_mock_volume.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -1731,16 +1731,16 @@ var _ = utils.SIGDescribe("CSI mock volume", func() {
17311731
},
17321732
}
17331733
for _, t := range tests {
1734-
test := t
1735-
ginkgo.It(test.name, func() {
1734+
t := t
1735+
ginkgo.It(t.name, func() {
17361736
var nodeStageFsGroup, nodePublishFsGroup string
17371737
if framework.NodeOSDistroIs("windows") {
17381738
e2eskipper.Skipf("FSGroupPolicy is only applied on linux nodes -- skipping")
17391739
}
17401740
init(testParameters{
17411741
disableAttach: true,
17421742
registerDriver: true,
1743-
enableVolumeMountGroup: test.enableVolumeMountGroup,
1743+
enableVolumeMountGroup: t.enableVolumeMountGroup,
17441744
hooks: createFSGroupRequestPreHook(&nodeStageFsGroup, &nodePublishFsGroup),
17451745
})
17461746
defer cleanup()
@@ -2479,14 +2479,14 @@ func createPreHook(method string, callback func(counter int64) error) *drivers.H
24792479
func createFSGroupRequestPreHook(nodeStageFsGroup, nodePublishFsGroup *string) *drivers.Hooks {
24802480
return &drivers.Hooks{
24812481
Pre: func(ctx context.Context, fullMethod string, request interface{}) (reply interface{}, err error) {
2482-
nodeStageRequest, ok := request.(csipbv1.NodeStageVolumeRequest)
2482+
nodeStageRequest, ok := request.(*csipbv1.NodeStageVolumeRequest)
24832483
if ok {
24842484
mountVolume := nodeStageRequest.GetVolumeCapability().GetMount()
24852485
if mountVolume != nil {
24862486
*nodeStageFsGroup = mountVolume.VolumeMountGroup
24872487
}
24882488
}
2489-
nodePublishRequest, ok := request.(csipbv1.NodePublishVolumeRequest)
2489+
nodePublishRequest, ok := request.(*csipbv1.NodePublishVolumeRequest)
24902490
if ok {
24912491
mountVolume := nodePublishRequest.GetVolumeCapability().GetMount()
24922492
if mountVolume != nil {

0 commit comments

Comments
 (0)