Skip to content

Commit 639e97d

Browse files
committed
Enforce offline volume expansion
1 parent 99b7db9 commit 639e97d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

mock/service/controller.go

+5
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ func (s *service) ControllerPublishVolume(
227227
v.VolumeContext[ReadOnlyKey] = roVal
228228
s.vols[i] = v
229229

230+
if volInfo, ok := MockVolumes[req.VolumeId]; ok {
231+
volInfo.ISPublished = true
232+
MockVolumes[req.VolumeId] = volInfo
233+
}
234+
230235
if hookVal, hookMsg := s.execHook("ControllerPublishVolumeEnd"); hookVal != codes.OK {
231236
return nil, status.Errorf(hookVal, hookMsg)
232237
}

mock/service/service.go

-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ type service struct {
109109
}
110110

111111
type Volume struct {
112-
sync.Mutex
113112
VolumeCSI csi.Volume
114113
NodeID string
115114
ISStaged bool

0 commit comments

Comments
 (0)