mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Retire mount.Exec for k8s.io/utils/exec
This patch removes mount.Exec entirely and instead uses the common utility from k8s.io/utils/exec. The fake exec implementation found in k8s.io/utils/exec differs a bit than mount.Exec, with the ability to pre-script expected calls to Command.CombinedOutput(), so tests that previously relied on a callback mechanism to produce specific output have been updated to use that mechanism.
This commit is contained in:
@@ -41,6 +41,8 @@ import (
|
||||
"k8s.io/client-go/tools/record"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
cloudprovider "k8s.io/cloud-provider"
|
||||
utilexec "k8s.io/utils/exec"
|
||||
|
||||
v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
|
||||
"k8s.io/kubernetes/pkg/controller/volume/events"
|
||||
"k8s.io/kubernetes/pkg/util/mount"
|
||||
@@ -380,8 +382,8 @@ func (expc *expandController) GetMounter(pluginName string) mount.Interface {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (expc *expandController) GetExec(pluginName string) mount.Exec {
|
||||
return mount.NewOSExec()
|
||||
func (expc *expandController) GetExec(pluginName string) utilexec.Interface {
|
||||
return utilexec.New()
|
||||
}
|
||||
|
||||
func (expc *expandController) GetHostName() string {
|
||||
|
||||
Reference in New Issue
Block a user