1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/test-src/test_server.cc
2019-02-09 03:08:02 +01:00

24 lines
514 B
C++

#include <gtest/gtest.h>
#include <cstdlib>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "wsfs/server.h"
#include "wsfs/server_config.h"
TEST(server, create_dispose)
{
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);
wsfs_server_config_cleanup(&config);
rmdir("test");
}