fix(cli): scaletest: do not screenshot if verbose=false (#12317)

This commit is contained in:
Cian Johnston
2024-02-27 12:35:48 +00:00
committed by GitHub
parent 2ca8248315
commit 96c9838ce3

View File

@ -1214,6 +1214,11 @@ func (r *RootCmd) scaletestDashboard() *clibase.Cmd {
// This could be useful for debugging, but it will blow up the disk.
if r.verbose {
config.Screenshot = dashboard.Screenshot
} else {
// Disable screenshots otherwise.
config.Screenshot = func(context.Context, string) (string, error) {
return "/dev/null", nil
}
}
//nolint:gocritic
logger.Info(ctx, "runner config", slog.F("interval", interval), slog.F("jitter", jitter), slog.F("headless", headless), slog.F("trace", tracingEnabled))