2019-01-30 21:28:50 +00:00
|
|
|
#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-02-25 19:17:13 +00:00
|
|
|
#include "wsfs/adapter/server.h"
|
|
|
|
#include "wsfs/adapter/server_config.h"
|
2019-02-09 02:08:02 +00:00
|
|
|
|
2019-01-30 21:28:50 +00:00
|
|
|
|
|
|
|
TEST(server, create_dispose)
|
|
|
|
{
|
2019-02-09 02:08:02 +00:00
|
|
|
mkdir("test", 0700);
|
|
|
|
|
2019-03-23 21:53:14 +00:00
|
|
|
struct wsfs_server_config * config = wsfs_server_config_create();
|
|
|
|
wsfs_server_config_set_mountpoint(config, "test");
|
|
|
|
struct wsfs_server * server = wsfs_server_create(config);
|
2019-01-30 21:28:50 +00:00
|
|
|
ASSERT_NE(nullptr, server);
|
|
|
|
|
|
|
|
wsfs_server_dispose(server);
|
2019-03-23 21:53:14 +00:00
|
|
|
wsfs_server_config_dispose(config);
|
2019-02-09 02:08:02 +00:00
|
|
|
|
|
|
|
rmdir("test");
|
2019-01-30 21:28:50 +00:00
|
|
|
}
|