diff options
Diffstat (limited to 'test/test-util.hpp')
-rw-r--r-- | test/test-util.hpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/test-util.hpp b/test/test-util.hpp index 20020f8..5b2a968 100644 --- a/test/test-util.hpp +++ b/test/test-util.hpp @@ -1,7 +1,8 @@ #pragma once -#include "pq-mock.h" +#include <connectionPool.h> #include <filesystem> +#include <pq-mock.h> namespace WebStat { #define XSTR(s) STR(s) @@ -20,5 +21,16 @@ namespace WebStat { MockDB(); }; + class MockDBPool : public DB::BasicConnectionPool { + public: + MockDBPool(std::string); + + protected: + DB::ConnectionPtr createResource() const; + + private: + std::string name; + }; + template<typename Out> using ParseData = std::tuple<std::string_view, Out>; } |