mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 00:34:10 -04:00
fix flake in detach tests
This commit is contained in:
parent
cf9b5ab95a
commit
4b589dfd7a
1 changed files with 1 additions and 1 deletions
|
|
@ -1084,7 +1084,6 @@ func (fv *FakeVolume) GetUnmountDeviceCallCount() int {
|
|||
func (fv *FakeVolume) Detach(volumeName string, nodeName types.NodeName) error {
|
||||
fv.Lock()
|
||||
defer fv.Unlock()
|
||||
fv.DetachCallCount++
|
||||
|
||||
node := string(nodeName)
|
||||
volumeNodes, exist := fv.VolumesAttached[volumeName]
|
||||
|
|
@ -1092,6 +1091,7 @@ func (fv *FakeVolume) Detach(volumeName string, nodeName types.NodeName) error {
|
|||
return fmt.Errorf("trying to detach volume %q that is not attached to the node %q", volumeName, node)
|
||||
}
|
||||
|
||||
fv.DetachCallCount++
|
||||
if nodeName == FailDetachNode {
|
||||
return fmt.Errorf("fail to detach volume %q to node %q", volumeName, nodeName)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue