mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 19:28:16 +00:00
Add unit tests for MountVolume() of operation executor
This commit is contained in:
@@ -154,10 +154,6 @@ func (grm *nestedPendingOperations) IsOperationPending(
|
||||
return false
|
||||
}
|
||||
|
||||
func (grm *nestedPendingOperations) GetOperations() []operation {
|
||||
return grm.operations
|
||||
}
|
||||
|
||||
// This is an internal function and caller should acquire and release the lock
|
||||
func (grm *nestedPendingOperations) isOperationExists(
|
||||
volumeName v1.UniqueVolumeName,
|
||||
|
||||
@@ -469,10 +469,6 @@ func (oe *operationExecutor) VerifyControllerAttachedVolume(
|
||||
volumeToMount.VolumeName, "" /* podName */, verifyControllerAttachedVolumeFunc)
|
||||
}
|
||||
|
||||
func (oe *operationExecutor) GetNestedPendingOperations() nestedpendingoperations.NestedPendingOperations {
|
||||
return oe.pendingOperations
|
||||
}
|
||||
|
||||
// TODO: this is a workaround for the unmount device issue caused by gci mounter.
|
||||
// In GCI cluster, if gci mounter is used for mounting, the container started by mounter
|
||||
// script will cause additional mounts created in the container. Since these mounts are
|
||||
|
||||
@@ -54,7 +54,8 @@ func TestOperationExecutor_MountVolume_ParallelMountForNonAttachablePlugins(t *t
|
||||
}
|
||||
|
||||
// Assert
|
||||
loop: for {
|
||||
loop:
|
||||
for {
|
||||
select {
|
||||
case <-ch:
|
||||
numMountOperationsStarted++
|
||||
@@ -93,7 +94,8 @@ func TestOperationExecutor_MountVolume_ParallelMountForAttachablePlugins(t *test
|
||||
}
|
||||
|
||||
// Assert
|
||||
loop: for {
|
||||
loop:
|
||||
for {
|
||||
select {
|
||||
case <-ch:
|
||||
numMountOperationsStarted++
|
||||
|
||||
Reference in New Issue
Block a user