mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Add unit tests for MountVolume() of operation executor
This commit is contained in:
parent
d5f7610b82
commit
e7e3c55ad7
@ -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++
|
||||
|
Loading…
Reference in New Issue
Block a user