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/adapter/test_server.cc

25 lines
549 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>
2019-03-26 22:04:53 +00:00
#include "webfuse/adapter/server.h"
#include "webfuse/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);
2019-03-26 22:04:53 +00:00
struct wf_server_config * config = wf_server_config_create();
wf_server_config_set_mountpoint(config, "test");
struct wf_server * server = wf_server_create(config);
ASSERT_NE(nullptr, server);
2019-03-26 22:04:53 +00:00
wf_server_dispose(server);
wf_server_config_dispose(config);
2019-02-09 02:08:02 +00:00
rmdir("test");
}