Skip to content

Commit

Permalink
fix: Fix broken tests (#1767)
Browse files Browse the repository at this point in the history
Fixes #1764
  • Loading branch information
kuznetsss authored Dec 2, 2024
1 parent 66691c4 commit a7074db
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 20 deletions.
2 changes: 0 additions & 2 deletions tests/unit/rpc/handlers/AccountChannelsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,6 @@ TEST_F(RPCAccountChannelsHandlerTest, AccountNotString)
// error case ledger non exist via hash
TEST_F(RPCAccountChannelsHandlerTest, NonExistLedgerViaLedgerHash)
{
backend->setRange(10, 30);

// mock fetchLedgerByHash return empty
ON_CALL(*backend, fetchLedgerByHash(ripple::uint256{LEDGERHASH}, _))
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/rpc/handlers/AccountInfoTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ TEST_P(AccountInfoParameterTest, InvalidParams)

TEST_F(AccountInfoParameterTest, ApiV1SignerListIsNotBool)
{
backend->setRange(10, 30);

static constexpr auto reqJson = R"(
{"ident":"rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun", "signer_lists":1}
)";
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/rpc/handlers/AccountLinesTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,6 @@ TEST_F(RPCAccountLinesHandlerTest, LimitZero)
// error case ledger non exist via hash
TEST_F(RPCAccountLinesHandlerTest, NonExistLedgerViaLedgerHash)
{
backend->setRange(10, 30);

// mock fetchLedgerByHash return empty
ON_CALL(*backend, fetchLedgerByHash(ripple::uint256{LEDGERHASH}, _))
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/rpc/handlers/MPTHoldersTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ TEST_F(RPCMPTHoldersHandlerTest, MarkerNotString)
// error case ledger non exist via hash
TEST_F(RPCMPTHoldersHandlerTest, NonExistLedgerViaLedgerHash)
{
backend->setRange(10, 30);

// mock fetchLedgerByHash return empty
EXPECT_CALL(*backend, fetchLedgerByHash).Times(1);
ON_CALL(*backend, fetchLedgerByHash(ripple::uint256{LEDGERHASH}, _))
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/rpc/handlers/NFTBuyOffersTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ TEST_F(RPCNFTBuyOffersHandlerTest, NFTIDNotString)
// error case ledger non exist via hash
TEST_F(RPCNFTBuyOffersHandlerTest, NonExistLedgerViaLedgerHash)
{
backend->setRange(10, 30);

// mock fetchLedgerByHash return empty
ON_CALL(*backend, fetchLedgerByHash(ripple::uint256{LEDGERHASH}, _))
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/rpc/handlers/NFTInfoTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ TEST_F(RPCNFTInfoHandlerTest, NFTIDNotString)
// error case ledger non exist via hash
TEST_F(RPCNFTInfoHandlerTest, NonExistLedgerViaLedgerHash)
{
backend->setRange(10, 30);

// mock fetchLedgerByHash return empty
ON_CALL(*backend, fetchLedgerByHash(ripple::uint256{LEDGERHASH}, _))
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/rpc/handlers/NFTSellOffersTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ TEST_F(RPCNFTSellOffersHandlerTest, NFTIDNotString)
// error case ledger non exist via hash
TEST_F(RPCNFTSellOffersHandlerTest, NonExistLedgerViaLedgerHash)
{
backend->setRange(10, 30);

// mock fetchLedgerByHash return empty
ON_CALL(*backend, fetchLedgerByHash(ripple::uint256{LEDGERHASH}, _))
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/rpc/handlers/NFTsByIssuerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,6 @@ TEST_F(RPCNFTsByIssuerHandlerTest, NFTIssuerNotString)
// error case ledger non exist via hash
TEST_F(RPCNFTsByIssuerHandlerTest, NonExistLedgerViaLedgerHash)
{
backend->setRange(10, 30);

// mock fetchLedgerByHash return empty
EXPECT_CALL(*backend, fetchLedgerByHash).Times(1);
ON_CALL(*backend, fetchLedgerByHash(ripple::uint256{LEDGERHASH}, _))
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/rpc/handlers/NoRippleCheckTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ TEST_P(NoRippleCheckParameterTest, InvalidParams)

TEST_F(NoRippleCheckParameterTest, V1ApiTransactionsIsNotBool)
{
backend->setRange(10, 30);

static constexpr auto reqJson = R"(
{
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/rpc/handlers/TransactionEntryTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ TEST_F(RPCTransactionEntryHandlerTest, TxHashWrongFormat)

TEST_F(RPCTransactionEntryHandlerTest, NonExistLedgerViaLedgerHash)
{
backend->setRange(10, 30);

// mock fetchLedgerByHash return empty
ON_CALL(*backend, fetchLedgerByHash(ripple::uint256{INDEX}, _))
.WillByDefault(Return(std::optional<ripple::LedgerHeader>{}));
Expand Down

0 comments on commit a7074db

Please sign in to comment.