Update TestCLIGetKubeconfig to ignore stderr output from get-kubeconfig
.
This will now have a deprecation warning, so we can't treat is as part of the YAML output. Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
parent
f9691208d5
commit
fe4e2d620d
@ -102,9 +102,14 @@ func runPinnipedCLIGetKubeconfig(t *testing.T, pinnipedExe, token, namespaceName
|
||||
"--pinniped-namespace", namespaceName,
|
||||
"--authenticator-type", authenticatorType,
|
||||
"--authenticator-name", authenticatorName,
|
||||
).CombinedOutput()
|
||||
require.NoError(t, err, string(output))
|
||||
).Output()
|
||||
|
||||
// Log stderr if there is a problem.
|
||||
var exitErr *exec.ExitError
|
||||
if errors.As(err, &exitErr) {
|
||||
t.Logf("stderr:\n%s\n", string(exitErr.Stderr))
|
||||
}
|
||||
require.NoError(t, err, string(output))
|
||||
return string(output)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user