Merge pull request #76227 from sawlanipradeep/window-plugin-fix

Replace syscall.Execve with exec.Command.
This commit is contained in:
Kubernetes Prow Robot
2019-07-08 13:00:36 -07:00
committed by GitHub
4 changed files with 29 additions and 6 deletions

View File

@@ -71,7 +71,7 @@ func TestKubectlCommandHandlesPlugins(t *testing.T) {
name: "test that a plugin executable is found based on command args",
args: []string{"kubectl", "foo", "--bar"},
expectPlugin: "plugin/testdata/kubectl-foo",
expectPluginArgs: []string{"foo", "--bar"},
expectPluginArgs: []string{"--bar"},
},
{
name: "test that a plugin does not execute over an existing command by the same name",
@@ -104,7 +104,7 @@ func TestKubectlCommandHandlesPlugins(t *testing.T) {
}
if len(pluginsHandler.withArgs) != len(test.expectPluginArgs) {
t.Fatalf("unexpected plugin execution args: expedcted %q, got %q", test.expectPluginArgs, pluginsHandler.withArgs)
t.Fatalf("unexpected plugin execution args: expected %q, got %q", test.expectPluginArgs, pluginsHandler.withArgs)
}
})
}