Merge pull request #128420 from tallclair/e2e-cleanup

Reuse cached client config for exec requests in e2e
This commit is contained in:
Kubernetes Prow Robot
2024-10-30 00:17:37 +00:00
committed by GitHub

View File

@@ -58,8 +58,6 @@ func ExecWithOptionsContext(ctx context.Context, f *framework.Framework, options
if !options.Quiet {
framework.Logf("ExecWithOptions %+v", options)
}
config, err := framework.LoadConfig()
framework.ExpectNoError(err, "failed to load restclient config")
const tty = false
@@ -80,7 +78,7 @@ func ExecWithOptionsContext(ctx context.Context, f *framework.Framework, options
var stdout, stderr bytes.Buffer
framework.Logf("ExecWithOptions: execute(POST %s)", req.URL())
err = execute(ctx, "POST", req.URL(), config, options.Stdin, &stdout, &stderr, tty)
err := execute(ctx, "POST", req.URL(), f.ClientConfig(), options.Stdin, &stdout, &stderr, tty)
if options.PreserveWhitespace {
return stdout.String(), stderr.String(), err