mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-05 04:56:11 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user