Add unit tests for MountVolume() of operation executor

This commit is contained in:
rkouj 2016-12-21 11:39:47 -08:00
parent d5f7610b82
commit e7e3c55ad7
7 changed files with 16 additions and 22 deletions

View File

@ -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,

View File

@ -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

View File

@ -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++