mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Merge pull request #111859 from omertuc/fixparallelclosure2
Fix failing `test/e2e/storage/csi_mock_volume.go` test
This commit is contained in:
commit
93054957c1
@ -1731,8 +1731,8 @@ var _ = utils.SIGDescribe("CSI mock volume", func() {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, t := range tests {
|
for _, t := range tests {
|
||||||
test := t
|
t := t
|
||||||
ginkgo.It(test.name, func() {
|
ginkgo.It(t.name, func() {
|
||||||
var nodeStageFsGroup, nodePublishFsGroup string
|
var nodeStageFsGroup, nodePublishFsGroup string
|
||||||
if framework.NodeOSDistroIs("windows") {
|
if framework.NodeOSDistroIs("windows") {
|
||||||
e2eskipper.Skipf("FSGroupPolicy is only applied on linux nodes -- skipping")
|
e2eskipper.Skipf("FSGroupPolicy is only applied on linux nodes -- skipping")
|
||||||
@ -1740,7 +1740,7 @@ var _ = utils.SIGDescribe("CSI mock volume", func() {
|
|||||||
init(testParameters{
|
init(testParameters{
|
||||||
disableAttach: true,
|
disableAttach: true,
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableVolumeMountGroup: test.enableVolumeMountGroup,
|
enableVolumeMountGroup: t.enableVolumeMountGroup,
|
||||||
hooks: createFSGroupRequestPreHook(&nodeStageFsGroup, &nodePublishFsGroup),
|
hooks: createFSGroupRequestPreHook(&nodeStageFsGroup, &nodePublishFsGroup),
|
||||||
})
|
})
|
||||||
defer cleanup()
|
defer cleanup()
|
||||||
@ -2479,14 +2479,14 @@ func createPreHook(method string, callback func(counter int64) error) *drivers.H
|
|||||||
func createFSGroupRequestPreHook(nodeStageFsGroup, nodePublishFsGroup *string) *drivers.Hooks {
|
func createFSGroupRequestPreHook(nodeStageFsGroup, nodePublishFsGroup *string) *drivers.Hooks {
|
||||||
return &drivers.Hooks{
|
return &drivers.Hooks{
|
||||||
Pre: func(ctx context.Context, fullMethod string, request interface{}) (reply interface{}, err error) {
|
Pre: func(ctx context.Context, fullMethod string, request interface{}) (reply interface{}, err error) {
|
||||||
nodeStageRequest, ok := request.(csipbv1.NodeStageVolumeRequest)
|
nodeStageRequest, ok := request.(*csipbv1.NodeStageVolumeRequest)
|
||||||
if ok {
|
if ok {
|
||||||
mountVolume := nodeStageRequest.GetVolumeCapability().GetMount()
|
mountVolume := nodeStageRequest.GetVolumeCapability().GetMount()
|
||||||
if mountVolume != nil {
|
if mountVolume != nil {
|
||||||
*nodeStageFsGroup = mountVolume.VolumeMountGroup
|
*nodeStageFsGroup = mountVolume.VolumeMountGroup
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nodePublishRequest, ok := request.(csipbv1.NodePublishVolumeRequest)
|
nodePublishRequest, ok := request.(*csipbv1.NodePublishVolumeRequest)
|
||||||
if ok {
|
if ok {
|
||||||
mountVolume := nodePublishRequest.GetVolumeCapability().GetMount()
|
mountVolume := nodePublishRequest.GetVolumeCapability().GetMount()
|
||||||
if mountVolume != nil {
|
if mountVolume != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user