20#ifndef ORES_TESTING_DATABASE_LIFECYCLE_LISTENER_HPP
21#define ORES_TESTING_DATABASE_LIFECYCLE_LISTENER_HPP
24#include <catch2/reporters/catch_reporter_event_listener.hpp>
25#include "ores.utility/log/make_logger.hpp"
38 inline static std::string_view logger_name =
39 "ores.testing.database_lifecycle_listener";
43 static auto instance = make_logger(logger_name);
48 using Catch::EventListenerBase::EventListenerBase;
58 void testRunEnded(Catch::TestRunStats
const& testRunStats)
override;
61 std::string test_db_name_;
Testing infrastructure common to all test projects.
Definition database_helper.hpp:27
Implements logging for ORE Studio.
Definition lifecycle_manager.hpp:30
Catch2 listener that manages database lifecycle for tests.
Definition database_lifecycle_listener.hpp:36
void testRunStarting(Catch::TestRunInfo const &testRunInfo) override
Called when test run starts - creates the test database.
Definition database_lifecycle_listener.cpp:30
void testRunEnded(Catch::TestRunStats const &testRunStats) override
Called when test run ends - drops the test database.
Definition database_lifecycle_listener.cpp:47