1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00
falk-werner_webfuse/test/test_server.cc

24 lines
530 B
C++
Raw Normal View History

#include <gtest/gtest.h>
2019-02-09 02:08:02 +00:00
#include <cstdlib>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "wsfs/adapter/server.h"
#include "wsfs/adapter/server_config.h"
2019-02-09 02:08:02 +00:00
TEST(server, create_dispose)
{
2019-02-09 02:08:02 +00:00
mkdir("test", 0700);
struct wsfs_server_config config = {strdup("test"), nullptr, nullptr, nullptr, nullptr, 0};
struct wsfs_server * server = wsfs_server_create(&config);
ASSERT_NE(nullptr, server);
wsfs_server_dispose(server);
2019-02-09 02:08:02 +00:00
wsfs_server_config_cleanup(&config);
rmdir("test");
}