Add framework for executing tests against multiple postgresql versions using docker compose.

This commit is contained in:
eelke 2026-10-18 12:09:54 +02:00
parent 655c6fceb1
commit c3bf9e88e4
13 changed files with 457 additions and 0 deletions

View file

@ -0,0 +1,26 @@
#pragma once
#include <gtest/gtest.h>
#include <memory>
#include <QString>
#include "Pgsql_Connection.h"
namespace pgtest {
/// Fixture giving every test its own database cloned from the template.
class DbTest : public ::testing::Test {
protected:
void SetUp() override;
void TearDown() override;
Pgsql::Connection& conn() { return *conn_; }
QString dbName() const { return dbName_; }
QString dbUrl() const;
private:
QString dbName_;
std::unique_ptr<Pgsql::Connection> conn_;
};
} // namespace pgtest