mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-03 23:03:53 +00:00
Merge pull request #76227 from sawlanipradeep/window-plugin-fix
Replace syscall.Execve with exec.Command.
This commit is contained in:
@@ -44,6 +44,10 @@ run_plugins_tests() {
|
||||
output_message=$(PATH=${PATH}:"test/fixtures/pkg/kubectl/plugins" kubectl foo)
|
||||
kube::test::if_has_string "${output_message}" 'plugin foo'
|
||||
|
||||
# check arguments passed to the plugin
|
||||
output_message=$(PATH=${PATH}:"test/fixtures/pkg/kubectl/plugins/bar" kubectl bar arg1)
|
||||
kube::test::if_has_string "${output_message}" 'test/fixtures/pkg/kubectl/plugins/bar/kubectl-bar arg1'
|
||||
|
||||
# ensure that a kubectl command supersedes a plugin that overshadows it
|
||||
output_message=$(PATH=${PATH}:"test/fixtures/pkg/kubectl/plugins/version" kubectl version)
|
||||
kube::test::if_has_string "${output_message}" 'Client Version'
|
||||
|
||||
3
test/fixtures/pkg/kubectl/plugins/bar/kubectl-bar
vendored
Executable file
3
test/fixtures/pkg/kubectl/plugins/bar/kubectl-bar
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "I am plugin bar called with args $0 $@"
|
||||
Reference in New Issue
Block a user