summaryrefslogtreecommitdiffhomepage
path: root/tests/test-compiledsql.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-01-02 19:59:41 +0100
committerRoland Reichwein <mail@reichwein.it>2023-01-02 19:59:41 +0100
commit992a1b3d2653ed527c2a301f80140bc35d84e832 (patch)
tree73981b8a28a0368f2b74b0369b1ecf649c908f77 /tests/test-compiledsql.cpp
parent20ceb53ec1c1bc18face8e831292dfe81fed3817 (diff)
Switch from ImageMagick to GraphicsMagick for deterministic data; added tests
Diffstat (limited to 'tests/test-compiledsql.cpp')
-rw-r--r--tests/test-compiledsql.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/test-compiledsql.cpp b/tests/test-compiledsql.cpp
new file mode 100644
index 0000000..4fe29e0
--- /dev/null
+++ b/tests/test-compiledsql.cpp
@@ -0,0 +1,57 @@
+#include <gtest/gtest.h>
+
+#include <filesystem>
+#include <memory>
+#include <string>
+#include <system_error>
+
+#include "libreichwein/file.h"
+
+#include "config.h"
+#include "storage.h"
+#include "whiteboard.h"
+
+namespace fs = std::filesystem;
+
+namespace {
+ const std::string testConfigFilename{"./test.conf"};
+ const std::string testDbFilename{"./whiteboard.db3"};
+}
+
+class CompiledSQLTest: public ::testing::Test
+{
+protected:
+ CompiledSQLTest(){
+ }
+
+ ~CompiledSQLTest() override{
+ }
+
+ void SetUp() override
+ {
+ File::setFile(testConfigFilename, R"CONFIG(
+<config>
+ <datapath>.</datapath>
+ <maxage>2592000</maxage>
+</config>
+)CONFIG");
+ std::error_code ec;
+ fs::remove(testDbFilename, ec);
+
+ m_config = std::make_shared<Config>(testConfigFilename);
+ }
+
+ void TearDown() override
+ {
+ std::error_code ec;
+ fs::remove(testDbFilename, ec);
+ fs::remove(testConfigFilename, ec);
+ }
+
+ std::shared_ptr<Config> m_config;
+};
+
+TEST_F(CompiledSQLTest, connection)
+{
+}
+