From b987dbc8aefd03c7995c81434aee18a156671749 Mon Sep 17 00:00:00 2001 From: Fedor Muratov Date: Wed, 15 Aug 2018 12:21:14 +0300 Subject: [PATCH] Fix client tests with mst batches Signed-off-by: Fedor Muratov --- test/module/iroha-cli/CMakeLists.txt | 21 ++++++++++----------- test/module/iroha-cli/client_test.cpp | 8 ++++---- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/test/module/iroha-cli/CMakeLists.txt b/test/module/iroha-cli/CMakeLists.txt index a4e3530a09..fd78e36041 100644 --- a/test/module/iroha-cli/CMakeLists.txt +++ b/test/module/iroha-cli/CMakeLists.txt @@ -15,14 +15,13 @@ # limitations under the License. # -#TODO: muratovv, IR-1589, fix compilation errors and pass tests -#addtest(client_test client_test.cpp) -#target_link_libraries(client_test -# client -# processors -# server_runner -# query_execution -# ) -#target_include_directories(client_test PUBLIC -# ${PROJECT_SOURCE_DIR}/iroha-cli -# ) +addtest(client_test client_test.cpp) +target_link_libraries(client_test + client + processors + server_runner + query_execution + ) +target_include_directories(client_test PUBLIC + ${PROJECT_SOURCE_DIR}/iroha-cli + ) diff --git a/test/module/iroha-cli/client_test.cpp b/test/module/iroha-cli/client_test.cpp index 8f3c5b4e19..6cfc77016e 100644 --- a/test/module/iroha-cli/client_test.cpp +++ b/test/module/iroha-cli/client_test.cpp @@ -84,9 +84,9 @@ class ClientServerTest : public testing::Test { EXPECT_CALL(*pcsMock, on_verified_proposal()) .WillRepeatedly(Return(verified_prop_notifier.get_observable())); - EXPECT_CALL(*mst, onPreparedTransactionsImpl()) + EXPECT_CALL(*mst, onPreparedBatchesImpl()) .WillRepeatedly(Return(mst_prepared_notifier.get_observable())); - EXPECT_CALL(*mst, onExpiredTransactionsImpl()) + EXPECT_CALL(*mst, onExpiredBatchesImpl()) .WillRepeatedly(Return(mst_expired_notifier.get_observable())); auto status_bus = std::make_shared(); @@ -149,7 +149,7 @@ class ClientServerTest : public testing::Test { TEST_F(ClientServerTest, SendTxWhenValid) { iroha_cli::CliClient client(ip, port); - EXPECT_CALL(*pcsMock, propagate_transaction(_)).Times(1); + EXPECT_CALL(*pcsMock, propagate_batch(_)).Times(1); auto shm_tx = shared_model::proto::TransactionBuilder() .creatorAccountId("some@account") @@ -228,7 +228,7 @@ TEST_F(ClientServerTest, SendTxWhenStatelessInvalid) { */ TEST_F(ClientServerTest, SendTxWhenStatefulInvalid) { iroha_cli::CliClient client(ip, port); - EXPECT_CALL(*pcsMock, propagate_transaction(_)).Times(1); + EXPECT_CALL(*pcsMock, propagate_batch(_)).Times(1); // creating stateful invalid tx auto tx = TransactionBuilder()