From f4cbb1ae74a1d5cd046952fd5d83a2daf1a4ad01 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 3 Dec 2020 17:25:17 +0300 Subject: [PATCH] cli/test: clean input buffer after execution --- cli/executor_test.go | 4 +++- cli/multisig_test.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/executor_test.go b/cli/executor_test.go index c53231615..be56c31ec 100644 --- a/cli/executor_test.go +++ b/cli/executor_test.go @@ -184,7 +184,9 @@ func (e *executor) Run(t *testing.T, args ...string) { func (e *executor) run(args ...string) error { e.Out.Reset() e.Err.Reset() - return e.CLI.Run(args) + err := e.CLI.Run(args) + e.In.Reset() + return err } func (e *executor) checkTxPersisted(t *testing.T, prefix ...string) (*transaction.Transaction, uint32) { diff --git a/cli/multisig_test.go b/cli/multisig_test.go index d8aebfef5..7694d0c73 100644 --- a/cli/multisig_test.go +++ b/cli/multisig_test.go @@ -36,8 +36,8 @@ func TestSignMultisigTx(t *testing.T) { defer os.Remove(wallet2Path) addAccount := func(w string, wif string) { - e.In.WriteString("acc\rpass\rpass\r") e.Run(t, "neo-go", "wallet", "init", "--wallet", w) + e.In.WriteString("acc\rpass\rpass\r") e.Run(t, "neo-go", "wallet", "import-multisig", "--wallet", w, "--wif", wif,