Cleanup tests (#125)

* fix test

* remove debug statements
This commit is contained in:
Denis Angell
2023-09-29 15:10:43 +02:00
committed by GitHub
parent 9841c8da72
commit ea25183858
2 changed files with 6 additions and 25 deletions

View File

@@ -494,28 +494,6 @@ class UNLReportFork_test : public beast::unit_test::suite
};
std::vector<PublicKey> vlKeys;
STTx
createUNLRTx1(
std::uint32_t seq,
PublicKey const& importKey,
PublicKey const& valKey)
{
auto fill = [&](auto& obj) {
obj.setFieldU32(sfLedgerSequence, seq);
obj.set(([&]() {
auto inner = std::make_unique<STObject>(sfActiveValidator);
inner->setFieldVL(sfPublicKey, valKey);
return inner;
})());
obj.set(([&]() {
auto inner = std::make_unique<STObject>(sfImportVLKey);
inner->setFieldVL(sfPublicKey, importKey);
return inner;
})());
};
return STTx(ttUNL_REPORT, fill);
}
void
testVLImportByzantine()
{
@@ -555,10 +533,11 @@ class UNLReportFork_test : public beast::unit_test::suite
e.trustAndConnect(a + b + c + d + e, delay);
PeerGroup network = a + b + c + d + e;
#if 0
StreamCollector sc{std::cout};
sim.collectors.add(sc);
#endif
// set prior state
sim.run(255);
@@ -612,6 +591,8 @@ class UNLReportFork_test : public beast::unit_test::suite
BEAST_EXPECT(sim.synchronized());
BEAST_EXPECT(sim.branches() == 1);
pass();
}
void

View File

@@ -367,7 +367,7 @@ class Transaction_test : public beast::unit_test::suite
if (deltaEndSeq)
BEAST_EXPECT(!result[jss::result][jss::searched_all].asBool());
else
BEAST_EXPECT(!result[jss::result][jss::searched_all].asBool());
BEAST_EXPECT(result[jss::result][jss::searched_all].asBool());
}
// Find transactions outside of provided range.
@@ -435,7 +435,7 @@ class Transaction_test : public beast::unit_test::suite
result[jss::result][jss::status] == jss::error &&
result[jss::result][jss::error] == NOT_FOUND);
BEAST_EXPECT(!result[jss::result][jss::searched_all].asBool());
BEAST_EXPECT(result[jss::result][jss::searched_all].asBool());
}
// Provide range without providing the `binary`