From e2ae2bb551e2c723b52da4b813b194060014d288 Mon Sep 17 00:00:00 2001 From: atheeshp <59333759+atheeshp@users.noreply.github.com> Date: Thu, 17 Nov 2022 21:14:25 +0530 Subject: [PATCH] fix: attempt fixing evidence flaky test (#13901) --- x/evidence/client/cli/tx_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/evidence/client/cli/tx_test.go b/x/evidence/client/cli/tx_test.go index bbb162564c..94b9ed517d 100644 --- a/x/evidence/client/cli/tx_test.go +++ b/x/evidence/client/cli/tx_test.go @@ -24,10 +24,6 @@ import ( ) func TestGetQueryCmd(t *testing.T) { - cmd := cli.GetQueryCmd() - cmd.SetOut(io.Discard) - require.NotNil(t, cmd) - encCfg := testutilmod.MakeTestEncodingConfig(evidence.AppModuleBasic{}) kr := keyring.NewInMemory(encCfg.Codec) baseCtx := client.Context{}. @@ -98,6 +94,10 @@ func TestGetQueryCmd(t *testing.T) { clientCtx := tc.ctxGen().WithOutput(&outBuf) ctx := svrcmd.CreateExecuteContext(context.Background()) + cmd := cli.GetQueryCmd() + cmd.SetOut(io.Discard) + require.NotNil(t, cmd) + cmd.SetContext(ctx) cmd.SetArgs(tc.args)