Merge pull request #96194 from jayunit100/patch-15

Add a verbosity option to framework.exec
This commit is contained in:
Kubernetes Prow Robot 2020-11-04 00:14:12 -08:00 committed by GitHub
commit e1909c70e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,14 +43,16 @@ type ExecOptions struct {
CaptureStderr bool
// If false, whitespace in std{err,out} will be removed.
PreserveWhitespace bool
Quiet bool
}
// ExecWithOptions executes a command in the specified container,
// returning stdout, stderr and error. `options` allowed for
// additional parameters to be passed.
func (f *Framework) ExecWithOptions(options ExecOptions) (string, string, error) {
Logf("ExecWithOptions %+v", options)
if !options.Quiet {
Logf("ExecWithOptions %+v", options)
}
config, err := LoadConfig()
ExpectNoError(err, "failed to load restclient config")