From 96c9838ce3cfab2722b0990bd77fc4e11e6dfb8b Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 27 Feb 2024 12:35:48 +0000 Subject: [PATCH] fix(cli): scaletest: do not screenshot if verbose=false (#12317) --- cli/exp_scaletest.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/exp_scaletest.go b/cli/exp_scaletest.go index a5e319a7de..fc8f503f3a 100644 --- a/cli/exp_scaletest.go +++ b/cli/exp_scaletest.go @@ -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))