Shut up noisy catch tests

stable
Jason Rhinelander 2 years ago
parent 8b00eacabf
commit dfb62d06ce
  1. 7
      test/peerstats/test_peer_db.cpp
  2. 1
      test/service/test_llarp_service_identity.cpp

@ -5,6 +5,7 @@
#include <catch2/catch.hpp>
#include "peerstats/types.hpp"
#include "router_contact.hpp"
#include "util/logging/logger.hpp"
#include "util/time.hpp"
TEST_CASE("Test PeerDb PeerStats memory storage", "[PeerDb]")
@ -40,6 +41,7 @@ TEST_CASE("Test PeerDb flush before load", "[PeerDb]")
TEST_CASE("Test PeerDb load twice", "[PeerDb]")
{
llarp::LogSilencer shutup;
llarp::PeerDb db;
CHECK_NOTHROW(db.loadDatabase(std::nullopt));
CHECK_THROWS_WITH(db.loadDatabase(std::nullopt), "Reloading database not supported");
@ -47,6 +49,7 @@ TEST_CASE("Test PeerDb load twice", "[PeerDb]")
TEST_CASE("Test PeerDb nukes stats on load", "[PeerDb]")
{
llarp::LogSilencer shutup;
const llarp::RouterID id = llarp::test::makeBuf<llarp::RouterID>(0x01);
llarp::PeerDb db;
@ -64,6 +67,7 @@ TEST_CASE("Test PeerDb nukes stats on load", "[PeerDb]")
TEST_CASE("Test PeerDb file-backed database reloads properly", "[PeerDb]")
{
llarp::LogSilencer shutup;
const std::string filename = "/tmp/peerdb_test_tmp2.db.sqlite";
const llarp::RouterID id = llarp::test::makeBuf<llarp::RouterID>(0x02);
@ -93,6 +97,7 @@ TEST_CASE("Test PeerDb file-backed database reloads properly", "[PeerDb]")
TEST_CASE("Test PeerDb modifyPeerStats", "[PeerDb]")
{
llarp::LogSilencer shutup;
const llarp::RouterID id = llarp::test::makeBuf<llarp::RouterID>(0xF2);
int numTimesCalled = 0;
@ -117,6 +122,7 @@ TEST_CASE("Test PeerDb modifyPeerStats", "[PeerDb]")
TEST_CASE("Test PeerDb handleGossipedRC", "[PeerDb]")
{
llarp::LogSilencer shutup;
const llarp::RouterID id = llarp::test::makeBuf<llarp::RouterID>(0xCA);
auto rcLifetime = llarp::RouterContact::Lifetime;
@ -156,6 +162,7 @@ TEST_CASE("Test PeerDb handleGossipedRC", "[PeerDb]")
TEST_CASE("Test PeerDb handleGossipedRC expiry calcs", "[PeerDb]")
{
llarp::LogSilencer shutup;
const llarp::RouterID id = llarp::test::makeBuf<llarp::RouterID>(0xF9);
// see comments in peer_db.cpp above PeerDb::handleGossipedRC() for some context around these

@ -203,6 +203,7 @@ TEST_CASE("Test signing with derived key", "[crypto]")
TEST_CASE("Test sign and encrypt introset", "[crypto]")
{
llarp::LogSilencer shutup;
CryptoManager manager(new sodium::CryptoLibSodium());
service::Identity ident;

Loading…
Cancel
Save