mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
refactor: merged code structure
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/mocks/fake_invokation_context.hpp"
|
||||
#include "webfuse_provider/mocks/fake_invokation_context.hpp"
|
||||
|
||||
namespace webfuse_test
|
||||
{
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef FAKE_INVOCATION_CONTEXT_HPP
|
||||
#define FAKE_INVOCATION_CONTEXT_HPP
|
||||
|
||||
#include "webfuse/provider/impl/provider.h"
|
||||
#include "webfuse/mocks/mock_provider.hpp"
|
||||
#include "webfuse_provider/impl/provider.h"
|
||||
#include "webfuse_provider/mocks/mock_provider.hpp"
|
||||
|
||||
namespace webfuse_test
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "webfuse/mocks/mock_jsonrpc_proxy.hpp"
|
||||
#include "webfuse/utils/wrap.hpp"
|
||||
#include "webfuse_provider/mocks/mock_jsonrpc_proxy.hpp"
|
||||
#include "webfuse_provider/utils/wrap.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef MOCK_JSONRPC_PROXY_HPP
|
||||
#define MOCK_JSONRPC_PROXY_HPP
|
||||
|
||||
#include "webfuse/core/jsonrpc/proxy_intern.h"
|
||||
#include "webfuse_provider/impl/jsonrpc/proxy_intern.h"
|
||||
#include <gmock/gmock.h>
|
||||
|
||||
namespace webfuse_test
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/mocks/mock_operation_context.hpp"
|
||||
#include "webfuse_provider/mocks/mock_operation_context.hpp"
|
||||
#include "webfuse/utils/wrap.hpp"
|
||||
|
||||
extern "C"
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/mocks/mock_provider.hpp"
|
||||
#include "webfuse_provider/mocks/mock_provider.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef WF_MOCK_PROVIDER_HPP
|
||||
#define WF_MOCK_PROVIDER_HPP
|
||||
|
||||
#include "webfuse/provider/impl/provider.h"
|
||||
#include "webfuse_provider/impl/provider.h"
|
||||
#include <gmock/gmock.h>
|
||||
|
||||
namespace webfuse_test
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "webfuse/mocks/mock_provider_client.hpp"
|
||||
#include "webfuse/provider/operation/error.h"
|
||||
#include "webfuse/provider/dirbuffer.h"
|
||||
#include "webfuse_provider/mocks/mock_provider_client.hpp"
|
||||
#include "webfuse_provider/operation/error.h"
|
||||
#include "webfuse_provider/dirbuffer.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -2,8 +2,8 @@
|
||||
#define WF_MOCK_PROVIDER_CLIENT_HPP
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
#include "webfuse/provider/client_config.h"
|
||||
#include "webfuse/core/status.h"
|
||||
#include "webfuse_provider/client_config.h"
|
||||
#include "webfuse_provider/status.h"
|
||||
#include <stdexcept>
|
||||
|
||||
namespace webfuse_test
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/mocks/mock_request.hpp"
|
||||
#include "webfuse_provider/mocks/mock_request.hpp"
|
||||
#include <cstdlib>
|
||||
|
||||
extern "C"
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <gmock/gmock.h>
|
||||
#include <jansson.h>
|
||||
#include <cstring>
|
||||
#include "webfuse/provider/impl/request.h"
|
||||
#include "webfuse_provider/impl/request.h"
|
||||
|
||||
|
||||
namespace webfuse_test
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "webfuse/tests/core/jsonrpc/mock_timer.hpp"
|
||||
#include "webfuse/utils/wrap.hpp"
|
||||
#include "webfuse_provider/tests/core/jsonrpc/mock_timer.hpp"
|
||||
#include "webfuse_provider/utils/wrap.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef WF_JSONRPC_MOCK_TIMERMANAGER_HPP
|
||||
#define WF_JSONRPC_MOCK_TIMERMANAGER_HPP
|
||||
|
||||
#include "webfuse/core/timer/timer.h"
|
||||
#include "webfuse/core/timer/manager.h"
|
||||
#include "webfuse_provider/impl/timer/timer.h"
|
||||
#include "webfuse_provider/impl/timer/manager.h"
|
||||
#include <gmock/gmock.h>
|
||||
|
||||
namespace wf_jsonrpc_test
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/tests/core/jsonrpc/mock_timer_callback.hpp"
|
||||
#include "webfuse_provider/tests/core/jsonrpc/mock_timer_callback.hpp"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef WF_JSONRPC_MOCK_TIMERCALLBACK_HPP
|
||||
#define WF_JSONRPC_MOCK_TIMERCALLBACK_HPP
|
||||
|
||||
#include "webfuse/core/timer/on_timer_fn.h"
|
||||
#include "webfuse_provider/impl/timer/on_timer_fn.h"
|
||||
#include <gmock/gmock.h>
|
||||
|
||||
namespace wf_jsonrpc_test
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/jsonrpc/request.h"
|
||||
#include "webfuse_provider/impl/jsonrpc/request.h"
|
||||
|
||||
TEST(wf_jsonrpc_is_request, request_with_object_params)
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/jsonrpc/response.h"
|
||||
#include "webfuse_provider/impl/jsonrpc/response.h"
|
||||
|
||||
TEST(wf_jsonrpc_is_response, valid_result)
|
||||
{
|
||||
@@ -1,9 +1,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/jsonrpc/proxy.h"
|
||||
#include "webfuse/core/status.h"
|
||||
#include "webfuse/core/timer/manager.h"
|
||||
#include "webfuse_provider/impl/jsonrpc/proxy.h"
|
||||
#include "webfuse_provider/status.h"
|
||||
#include "webfuse_provider/impl/timer/manager.h"
|
||||
|
||||
#include "webfuse/tests/core/jsonrpc/mock_timer.hpp"
|
||||
#include "webfuse_provider/tests/core/jsonrpc/mock_timer.hpp"
|
||||
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/jsonrpc/request.h"
|
||||
#include "webfuse/core/status.h"
|
||||
#include "webfuse_provider/impl/jsonrpc/request.h"
|
||||
#include "webfuse_provider/status.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/jsonrpc/response_intern.h"
|
||||
#include "webfuse/core/status.h"
|
||||
#include "webfuse_provider/impl/jsonrpc/response_intern.h"
|
||||
#include "webfuse_provider/status.h"
|
||||
|
||||
TEST(wf_json_response, init_result)
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <string>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "webfuse/core/jsonrpc/response_intern.h"
|
||||
#include "webfuse_provider/impl/jsonrpc/response_intern.h"
|
||||
|
||||
|
||||
static void response_parse_str(
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/jsonrpc/server.h"
|
||||
#include "webfuse/core/jsonrpc/request.h"
|
||||
#include "webfuse/core/status.h"
|
||||
#include "webfuse_provider/impl/jsonrpc/server.h"
|
||||
#include "webfuse_provider/impl/jsonrpc/request.h"
|
||||
#include "webfuse_provider/status.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/base64.h"
|
||||
#include "webfuse_provider/impl/base64.h"
|
||||
|
||||
TEST(Base64, EncodedSize)
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/container_of.h"
|
||||
#include "webfuse_provider/impl/container_of.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <cstring>
|
||||
#include "webfuse/core/message.h"
|
||||
#include "webfuse_provider/impl/message.h"
|
||||
|
||||
TEST(wf_message, create)
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/message_queue.h"
|
||||
#include "webfuse/core/message.h"
|
||||
#include "webfuse/core/slist.h"
|
||||
#include "webfuse_provider/impl/message_queue.h"
|
||||
#include "webfuse_provider/impl/message.h"
|
||||
#include "webfuse_provider/impl/slist.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/slist.h"
|
||||
#include "webfuse_provider/impl/slist.h"
|
||||
|
||||
TEST(wf_slist, init)
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/status_intern.h"
|
||||
#include "webfuse_provider/impl/status_intern.h"
|
||||
|
||||
TEST(wf_status, tostring)
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "webfuse/core/url.h"
|
||||
#include "webfuse_provider/impl/url.h"
|
||||
|
||||
TEST(url, ParseWs)
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/core/json_util.h"
|
||||
#include "webfuse_provider/impl/json_util.h"
|
||||
|
||||
TEST(jsonrpc_util, get_int)
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "webfuse/core/timer/timepoint.h"
|
||||
#include "webfuse_provider/impl/timer/timepoint.h"
|
||||
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
#include "webfuse/core/timer/timer.h"
|
||||
#include "webfuse/core/timer/manager.h"
|
||||
#include "webfuse_provider/impl/timer/timer.h"
|
||||
#include "webfuse_provider/impl/timer/manager.h"
|
||||
|
||||
using std::size_t;
|
||||
using namespace std::chrono_literals;
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/tests/integration/file.hpp"
|
||||
#include "webfuse_provider/tests/integration/file.hpp"
|
||||
#include <cstdio>
|
||||
#include <sstream>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "webfuse/tests/integration/provider.hpp"
|
||||
#include "webfuse_provider/tests/integration/provider.hpp"
|
||||
#include "webfuse_provider.h"
|
||||
#include "webfuse/provider/impl/client.h"
|
||||
#include "webfuse_provider/impl/client.h"
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <chrono>
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/tests/integration/server.hpp"
|
||||
#include "webfuse_provider/tests/integration/server.hpp"
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "webfuse/tests/integration/server.hpp"
|
||||
#include "webfuse/tests/integration/provider.hpp"
|
||||
#include "webfuse/tests/integration/file.hpp"
|
||||
#include "webfuse_provider/tests/integration/server.hpp"
|
||||
#include "webfuse_provider/tests/integration/provider.hpp"
|
||||
#include "webfuse_provider/tests/integration/file.hpp"
|
||||
|
||||
#include <cstdio>
|
||||
#include <csignal>
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <dirent.h>
|
||||
|
||||
#include <jansson.h>
|
||||
#include "webfuse/core/lws_log.h"
|
||||
#include "webfuse_provider/impl/lws_log.h"
|
||||
|
||||
using webfuse_test::Server;
|
||||
using webfuse_test::Provider;
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "webfuse/provider/impl/operation/close.h"
|
||||
#include "webfuse/mocks/mock_provider.hpp"
|
||||
#include "webfuse/mocks/fake_invokation_context.hpp"
|
||||
#include "webfuse_provider/impl/operation/close.h"
|
||||
#include "webfuse_provider/mocks/mock_provider.hpp"
|
||||
#include "webfuse_provider/mocks/fake_invokation_context.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "webfuse/provider/impl/operation/getattr.h"
|
||||
#include "webfuse/mocks/mock_request.hpp"
|
||||
#include "webfuse/mocks/mock_provider.hpp"
|
||||
#include "webfuse/mocks/fake_invokation_context.hpp"
|
||||
#include "webfuse_provider/impl/operation/getattr.h"
|
||||
#include "webfuse_provider/mocks/mock_request.hpp"
|
||||
#include "webfuse_provider/mocks/mock_provider.hpp"
|
||||
#include "webfuse_provider/mocks/fake_invokation_context.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <cstdlib>
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "webfuse/provider/impl/operation/lookup.h"
|
||||
#include "webfuse/mocks/mock_request.hpp"
|
||||
#include "webfuse/mocks/mock_provider.hpp"
|
||||
#include "webfuse/mocks/fake_invokation_context.hpp"
|
||||
#include "webfuse_provider/impl/operation/lookup.h"
|
||||
#include "webfuse_provider/mocks/mock_request.hpp"
|
||||
#include "webfuse_provider/mocks/mock_provider.hpp"
|
||||
#include "webfuse_provider/mocks/fake_invokation_context.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <cstdlib>
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "webfuse/provider/impl/operation/open.h"
|
||||
#include "webfuse/mocks/mock_request.hpp"
|
||||
#include "webfuse/mocks/mock_provider.hpp"
|
||||
#include "webfuse/mocks/fake_invokation_context.hpp"
|
||||
#include "webfuse_provider/impl/operation/open.h"
|
||||
#include "webfuse_provider/mocks/mock_request.hpp"
|
||||
#include "webfuse_provider/mocks/mock_provider.hpp"
|
||||
#include "webfuse_provider/mocks/fake_invokation_context.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <cstdlib>
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "webfuse/provider/impl/operation/read.h"
|
||||
#include "webfuse/mocks/mock_request.hpp"
|
||||
#include "webfuse/mocks/mock_provider.hpp"
|
||||
#include "webfuse/mocks/fake_invokation_context.hpp"
|
||||
#include "webfuse_provider/impl/operation/read.h"
|
||||
#include "webfuse_provider/mocks/mock_request.hpp"
|
||||
#include "webfuse_provider/mocks/mock_provider.hpp"
|
||||
#include "webfuse_provider/mocks/fake_invokation_context.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <cstdlib>
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "webfuse/provider/impl/operation/readdir.h"
|
||||
#include "webfuse/mocks/mock_request.hpp"
|
||||
#include "webfuse/mocks/mock_provider.hpp"
|
||||
#include "webfuse/mocks/fake_invokation_context.hpp"
|
||||
#include "webfuse/provider/dirbuffer.h"
|
||||
#include "webfuse_provider/impl/operation/readdir.h"
|
||||
#include "webfuse_provider/mocks/mock_request.hpp"
|
||||
#include "webfuse_provider/mocks/mock_provider.hpp"
|
||||
#include "webfuse_provider/mocks/fake_invokation_context.hpp"
|
||||
#include "webfuse_provider/dirbuffer.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <cstdlib>
|
||||
@@ -1,12 +1,12 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock.h>
|
||||
|
||||
#include <webfuse/provider/client_protocol.h>
|
||||
#include <webfuse/provider/client_config.h>
|
||||
#include "webfuse/utils/ws_server.h"
|
||||
#include "webfuse/mocks/mock_provider_client.hpp"
|
||||
#include "webfuse/core/protocol_names.h"
|
||||
#include "webfuse/utils/timeout_watcher.hpp"
|
||||
#include <webfuse_provider/client_protocol.h>
|
||||
#include <webfuse_provider/client_config.h>
|
||||
#include "webfuse_provider/utils/ws_server.h"
|
||||
#include "webfuse_provider/mocks/mock_provider_client.hpp"
|
||||
#include "webfuse_provider/protocol_names.h"
|
||||
#include "webfuse_provider/utils/timeout_watcher.hpp"
|
||||
|
||||
#include <libwebsockets.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/provider/impl/dirbuffer.h"
|
||||
#include "webfuse_provider/impl/dirbuffer.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(DirBuffer, CreateDispose)
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/utils/file_utils.hpp"
|
||||
#include "webfuse_provider/utils/file_utils.hpp"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/utils/path.h"
|
||||
#include "webfuse_provider/utils/path.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "webfuse/utils/static_filesystem.h"
|
||||
#include "webfuse/provider/client_config.h"
|
||||
#include "webfuse/provider/dirbuffer.h"
|
||||
#include "webfuse/provider/operation/error.h"
|
||||
#include "webfuse_provider/utils/static_filesystem.h"
|
||||
#include "webfuse_provider/client_config.h"
|
||||
#include "webfuse_provider/dirbuffer.h"
|
||||
#include "webfuse_provider/operation/error.h"
|
||||
|
||||
#include "webfuse/utils/path.h"
|
||||
#include "webfuse/core/util.h"
|
||||
#include "webfuse_provider/utils/path.h"
|
||||
#include "webfuse_provider/impl/util.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -8,7 +8,7 @@
|
||||
using ::std::size_t;
|
||||
#endif
|
||||
|
||||
#include <webfuse/provider/api.h>
|
||||
#include <webfuse_provider/api.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/utils/tempdir.hpp"
|
||||
#include "webfuse_provider/utils/tempdir.hpp"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <cstdio>
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "webfuse/utils/timeout_watcher.hpp"
|
||||
#include "webfuse_provider/utils/timeout_watcher.hpp"
|
||||
#include <stdexcept>
|
||||
#include <thread>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "webfuse/utils/ws_server.h"
|
||||
#include "webfuse/core/lws_log.h"
|
||||
#include "webfuse_provider/utils/ws_server.h"
|
||||
#include "webfuse_provider/impl/lws_log.h"
|
||||
|
||||
#include <libwebsockets.h>
|
||||
#include <thread>
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "webfuse/utils/ws_server2.hpp"
|
||||
#include "webfuse/core/lws_log.h"
|
||||
#include "webfuse_provider/utils/ws_server2.hpp"
|
||||
#include "webfuse_provider/impl/lws_log.h"
|
||||
|
||||
#include <libwebsockets.h>
|
||||
#include <thread>
|
||||
Reference in New Issue
Block a user