From 241da98ee00058236634154dc850dd30131c44fe Mon Sep 17 00:00:00 2001 From: Rogger Vasquez Date: Thu, 28 Jul 2022 16:26:58 -0500 Subject: [PATCH] rpk: disable tune checkers in rp start unit test It doesn't make much sense to run the checkers in a memory backed filesystem (Afero.MemMapFs) during the unit test. Unit tests for checkers are in rpk/pkg/tuners --- src/go/rpk/pkg/cli/cmd/redpanda/start_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/go/rpk/pkg/cli/cmd/redpanda/start_test.go b/src/go/rpk/pkg/cli/cmd/redpanda/start_test.go index 86bd7efadc30..f5997f2e1fb7 100644 --- a/src/go/rpk/pkg/cli/cmd/redpanda/start_test.go +++ b/src/go/rpk/pkg/cli/cmd/redpanda/start_test.go @@ -1428,7 +1428,10 @@ func TestStartCommand(t *testing.T) { var out bytes.Buffer logrus.SetOutput(&out) c := NewStartCommand(fs, launcher) - c.SetArgs(tt.args) + // We disable --check flag to avoid running tuner checks in Afero's + // memory backed file system. + args := append([]string{"--check=false"}, tt.args...) + c.SetArgs(args) err := c.Execute() if tt.expectedErrMsg != "" { require.Contains(st, err.Error(), tt.expectedErrMsg)