|
|
@ -30,14 +30,27 @@ func TestManuallyProcessArgs(t *testing.T) {
|
|
|
|
"--debug",
|
|
|
|
"--debug",
|
|
|
|
"--foo", "bar",
|
|
|
|
"--foo", "bar",
|
|
|
|
"--kubeconfig=/home/foo",
|
|
|
|
"--kubeconfig=/home/foo",
|
|
|
|
|
|
|
|
"--kubeconfig", "/home/foo",
|
|
|
|
|
|
|
|
"--kube-context=test1",
|
|
|
|
"--kube-context", "test1",
|
|
|
|
"--kube-context", "test1",
|
|
|
|
|
|
|
|
"-n=test2",
|
|
|
|
"-n", "test2",
|
|
|
|
"-n", "test2",
|
|
|
|
|
|
|
|
"--namespace=test2",
|
|
|
|
|
|
|
|
"--namespace", "test2",
|
|
|
|
"--home=/tmp",
|
|
|
|
"--home=/tmp",
|
|
|
|
"command",
|
|
|
|
"command",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
expectKnown := []string{
|
|
|
|
expectKnown := []string{
|
|
|
|
"--debug", "--kubeconfig=/home/foo", "--kube-context", "test1", "-n", "test2",
|
|
|
|
"--debug",
|
|
|
|
|
|
|
|
"--kubeconfig=/home/foo",
|
|
|
|
|
|
|
|
"--kubeconfig", "/home/foo",
|
|
|
|
|
|
|
|
"--kube-context=test1",
|
|
|
|
|
|
|
|
"--kube-context", "test1",
|
|
|
|
|
|
|
|
"-n=test2",
|
|
|
|
|
|
|
|
"-n", "test2",
|
|
|
|
|
|
|
|
"--namespace=test2",
|
|
|
|
|
|
|
|
"--namespace", "test2",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
expectUnknown := []string{
|
|
|
|
expectUnknown := []string{
|
|
|
|