diff --git a/test/core/consensus/babe/babe_test.cpp b/test/core/consensus/babe/babe_test.cpp index d3190c0843..dbfd7ca13e 100644 --- a/test/core/consensus/babe/babe_test.cpp +++ b/test/core/consensus/babe/babe_test.cpp @@ -341,14 +341,6 @@ TEST_F(BabeTest, Success) { // we are not leader of the first slot, but leader of the second EXPECT_CALL(*block_tree_, bestBlock()).WillRepeatedly(Return(best_leaf)); - // call for check condition of offchain worker run - EXPECT_CALL(*block_tree_, getLastFinalized()) - .WillRepeatedly(Return(best_leaf)); - EXPECT_CALL(*block_tree_, getBestContaining(_)) - .WillOnce(Return(best_leaf)) - .WillOnce( - Return(BlockInfo(created_block_.header.number, created_block_hash_))); - EXPECT_CALL(*block_tree_, getBlockHeader(best_block_hash_)) .WillRepeatedly(Return(outcome::success(best_block_header_))); EXPECT_CALL(*block_tree_, getBlockHeader(created_block_hash_)) diff --git a/test/core/consensus/babe/block_executor_test.cpp b/test/core/consensus/babe/block_executor_test.cpp index f168eca763..e5ff3132d3 100644 --- a/test/core/consensus/babe/block_executor_test.cpp +++ b/test/core/consensus/babe/block_executor_test.cpp @@ -236,11 +236,11 @@ TEST_F(BlockExecutorTest, JustificationFollowDigests) { EXPECT_CALL(*block_tree_, getBlockHeader("parent_hash"_hash256)) .WillRepeatedly(testing::Return(kagome::primitives::BlockHeader{ .parent_hash = "grandparent_hash"_hash256, .number = 40})); - EXPECT_CALL(*block_tree_, getLastFinalized()) - .WillOnce(testing::Return(BlockInfo{40, "grandparent_hash"_hash256})) + EXPECT_CALL(*block_tree_, bestBlock()) + // previous best + .WillOnce(testing::Return(BlockInfo{41, "parent_hash"_hash256})) + // current best .WillOnce(testing::Return(BlockInfo{42, "some_hash"_hash256})); - EXPECT_CALL(*block_tree_, getBestContaining("grandparent_hash"_hash256)) - .WillOnce(testing::Return(BlockInfo{41, "parent_hash"_hash256})); EXPECT_CALL(*core_, execute_block_ref(_, _)) .WillOnce(testing::Return(outcome::success())); EXPECT_CALL(*block_tree_, addBlock(_)) @@ -256,8 +256,6 @@ TEST_F(BlockExecutorTest, JustificationFollowDigests) { onDigest(BlockContext{.block_info = {42, "some_hash"_hash256}}, _)) .WillOnce(testing::Return(outcome::success())); } - EXPECT_CALL(*block_tree_, getBestContaining("some_hash"_hash256)) - .WillOnce(testing::Return(BlockInfo{42, "some_hash"_hash256})); EXPECT_CALL(*offchain_worker_api_, offchain_worker(_, _)) .WillOnce(testing::Return(outcome::success())); @@ -271,7 +269,7 @@ TEST_F(BlockExecutorTest, JustificationFollowDigests) { block_executor_->applyBlock( Block{block_data.header.value(), block_data.body.value()}, justification, - [](auto &&result) { EXPECT_OUTCOME_TRUE_1(result); }); + [](auto &&result) { ASSERT_OUTCOME_SUCCESS_TRY(result); }); testutil::wait(*thread_pool_.io_context()); } diff --git a/zombienet/docker/requirements.txt b/zombienet/docker/requirements.txt index 2cc354c3c9..3b542ecf32 100644 --- a/zombienet/docker/requirements.txt +++ b/zombienet/docker/requirements.txt @@ -1 +1 @@ -GitPython==3.1.32 \ No newline at end of file +GitPython==3.1.35 \ No newline at end of file