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

Fix client tests with mst batches #1652

Merged
merged 1 commit into from
Aug 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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<iroha::torii::StatusBusImpl>();
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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()
Expand Down