Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Commit

Permalink
Fix client tests with mst batches
Browse files Browse the repository at this point in the history
Signed-off-by: Fedor Muratov <[email protected]>
  • Loading branch information
muratovv committed Aug 15, 2018
1 parent 01c65d7 commit 91e1279
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
21 changes: 10 additions & 11 deletions test/module/iroha-cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
8 changes: 4 additions & 4 deletions test/module/iroha-cli/client_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,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<iroha::torii::StatusBusImpl>();
Expand Down Expand Up @@ -146,7 +146,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")
Expand Down Expand Up @@ -225,7 +225,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()
Expand Down

0 comments on commit 91e1279

Please sign in to comment.