#include "SessionFixture.hpp" #include "connection.hpp" #include "catch2/catch_test_macros.hpp" namespace matador::test { SessionFixture::SessionFixture() : ses({bus, connection::dns, 4}, schema) , db(connection::dns) { REQUIRE(db.open()); } SessionFixture::~SessionFixture() { const auto result = schema.drop(db); REQUIRE(result.is_ok()); REQUIRE(db.close()); } void SessionFixture::drop_table_if_exists(const std::string &table_name) const { if (ses.table_exists(table_name)) { REQUIRE(ses.drop_table(table_name)); } } }