From d1616c192b6b3012429491fceb2c10ec0b9796f5 Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Thu, 29 Sep 2022 18:06:21 +0200 Subject: [PATCH] fix abci_cli tests --- abci/tests/test_cli/ex1.abci | 13 ++++------- abci/tests/test_cli/ex1.abci.out | 37 +++++++------------------------- abci/tests/test_cli/ex2.abci | 11 +++++----- abci/tests/test_cli/ex2.abci.out | 17 ++++++--------- 4 files changed, 24 insertions(+), 54 deletions(-) diff --git a/abci/tests/test_cli/ex1.abci b/abci/tests/test_cli/ex1.abci index 3245d4ddf..4faa8057f 100644 --- a/abci/tests/test_cli/ex1.abci +++ b/abci/tests/test_cli/ex1.abci @@ -1,17 +1,12 @@ echo hello info -prepare_proposal "abc" -process_proposal "abc" -finalize_block "abc" +prepare_proposal "abc=123" +process_proposal "abc=123" +finalize_block "abc=123" commit info query "abc" finalize_block "def=xyz" "ghi=123" commit query "def" -prepare_proposal "preparedef" -process_proposal "replacedef" -process_proposal "preparedef" -prepare_proposal -process_proposal -commit + diff --git a/abci/tests/test_cli/ex1.abci.out b/abci/tests/test_cli/ex1.abci.out index 70b93c32e..f26b63856 100644 --- a/abci/tests/test_cli/ex1.abci.out +++ b/abci/tests/test_cli/ex1.abci.out @@ -8,15 +8,15 @@ -> data: {"size":0} -> data.hex: 0x7B2273697A65223A307D -> prepare_proposal "abc" +> prepare_proposal "abc=123" -> code: OK --> log: Succeeded. Tx: abc +-> log: Succeeded. Tx: abc=123 -> process_proposal "abc" +> process_proposal "abc=123" -> code: OK -> status: ACCEPT -> finalize_block "abc" +> finalize_block "abc=123" -> code: OK -> code: OK -> data.hex: 0x0200000000000000 @@ -32,11 +32,11 @@ > query "abc" -> code: OK -> log: exists --> height: 1 +-> height: 0 -> key: abc -> key.hex: 616263 --> value: abc --> value.hex: 616263 +-> value: 123 +-> value.hex: 313233 > finalize_block "def=xyz" "ghi=123" -> code: OK @@ -50,30 +50,9 @@ > query "def" -> code: OK -> log: exists --> height: 2 +-> height: 0 -> key: def -> key.hex: 646566 -> value: xyz -> value.hex: 78797A -> prepare_proposal "preparedef" --> code: OK --> log: Succeeded. Tx: replacedef - -> process_proposal "replacedef" --> code: OK --> status: ACCEPT - -> process_proposal "preparedef" --> code: OK --> status: REJECT - -> prepare_proposal - -> process_proposal --> code: OK --> status: ACCEPT - -> commit --> code: OK - diff --git a/abci/tests/test_cli/ex2.abci b/abci/tests/test_cli/ex2.abci index 1cabba151..275f73bea 100644 --- a/abci/tests/test_cli/ex2.abci +++ b/abci/tests/test_cli/ex2.abci @@ -1,10 +1,9 @@ -check_tx 0x00 -check_tx 0xff -finalize_block 0x00 +check_tx "abc" +check_tx "def=567" +finalize_block "def=567" commit -check_tx 0x00 -finalize_block 0x01 +finalize_block "hello=world" commit -finalize_block 0x04 +finalize_block "first=second" commit info diff --git a/abci/tests/test_cli/ex2.abci.out b/abci/tests/test_cli/ex2.abci.out index e29a35368..ea24ce920 100644 --- a/abci/tests/test_cli/ex2.abci.out +++ b/abci/tests/test_cli/ex2.abci.out @@ -1,10 +1,10 @@ -> check_tx 0x00 +> check_tx "abc" +-> code: 2 + +> check_tx "def=567" -> code: OK -> check_tx 0xff --> code: OK - -> finalize_block 0x00 +> finalize_block "def=567" -> code: OK -> code: OK -> data.hex: 0x0200000000000000 @@ -12,10 +12,7 @@ > commit -> code: OK -> check_tx 0x00 --> code: OK - -> finalize_block 0x01 +> finalize_block "hello=world" -> code: OK -> code: OK -> data.hex: 0x0400000000000000 @@ -23,7 +20,7 @@ > commit -> code: OK -> finalize_block 0x04 +> finalize_block "first=second" -> code: OK -> code: OK -> data.hex: 0x0600000000000000