| // The purpose of this test is to simulate webserver_main function without the io_context running |
| // This should test whether the code crashes on startup or not. |
| // This should also include every file in this repo in order to get fully correct code coverage statistics |
| |
| #include "webserver_main_setup.hpp" |
| |
| #include <filesystem> |
| |
| #include <gmock/gmock.h> // IWYU pragma: keep |
| #include <gtest/gtest.h> // IWYU pragma: keep |
| |
| #include <valgrind/valgrind.h> |
| |
| TEST(SmokeTest, WebserverInitializationRunsCorrectly){ |
| |
| if (!RUNNING_ON_VALGRIND) |
| { |
| // /var/volatile must be created or else the initialization will fail |
| std::filesystem::create_directory("/var/volatile"); |
| |
| ASSERT_EQ(run(), 0); |
| } |
| } |