blob: 0b69b94bbe85e5f606827ccf8adc8da0d38e2dc7 [file] [log] [blame]
// 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);
}
}