diff --git a/cmake/unit_tests.cmake b/cmake/unit_tests.cmake index c4f779e..14ff04d 100644 --- a/cmake/unit_tests.cmake +++ b/cmake/unit_tests.cmake @@ -7,47 +7,47 @@ include(GoogleTest) pkg_check_modules(GMOCK gmock) add_executable(alltests - test/tempdir.cc - test/file_utils.cc - test/msleep.cc - test/die_if.cc - test/timeout_watcher.cc - test/fake_adapter_server.cc - test/mock_authenticator.cc - test/mock_request.cc - test/core/test_container_of.cc - test/core/test_string.cc - test/core/test_slist.cc - test/core/test_path.cc - test/core/test_base64.cc - test/core/test_status.cc - test/core/test_message.cc - test/core/test_message_queue.cc - test/adapter/test_response_parser.cc - test/adapter/test_server.cc - test/adapter/test_server_config.cc - test/adapter/test_timepoint.cc - test/adapter/test_timer.cc - test/adapter/test_credentials.cc - test/adapter/test_authenticator.cc - test/adapter/test_authenticators.cc - test/adapter/test_mountpoint.cc - test/adapter/test_uuid_mountpoint.cc - test/adapter/test_uuid_mountpoint_factory.cc - test/adapter/test_fuse_req.cc - test/adapter/jsonrpc/test_util.cc - test/adapter/jsonrpc/test_is_request.cc - test/adapter/jsonrpc/test_request.cc - test/adapter/jsonrpc/test_is_response.cc - test/adapter/jsonrpc/test_response.cc - test/adapter/jsonrpc/test_server.cc - test/adapter/jsonrpc/test_proxy.cc - test/provider/test_url.cc - test/provider/test_static_filesystem.cc - test/provider/test_client_protocol.cc - test/integration/test_integration.cc - test/integration/server.cc - test/integration/provider.cc + test/webfuse/utils/tempdir.cc + test/webfuse/utils/file_utils.cc + test/webfuse/utils/msleep.cc + test/webfuse/utils/die_if.cc + test/webfuse/utils/timeout_watcher.cc + test/webfuse/fakes/fake_adapter_server.cc + test/webfuse/mocks/mock_authenticator.cc + test/webfuse/mocks/mock_request.cc + test/webfuse/tests/core/test_container_of.cc + test/webfuse/tests/core/test_string.cc + test/webfuse/tests/core/test_slist.cc + test/webfuse/tests/core/test_path.cc + test/webfuse/tests/core/test_base64.cc + test/webfuse/tests/core/test_status.cc + test/webfuse/tests/core/test_message.cc + test/webfuse/tests/core/test_message_queue.cc + test/webfuse/tests/adapter/test_response_parser.cc + test/webfuse/tests/adapter/test_server.cc + test/webfuse/tests/adapter/test_server_config.cc + test/webfuse/tests/adapter/test_timepoint.cc + test/webfuse/tests/adapter/test_timer.cc + test/webfuse/tests/adapter/test_credentials.cc + test/webfuse/tests/adapter/test_authenticator.cc + test/webfuse/tests/adapter/test_authenticators.cc + test/webfuse/tests/adapter/test_mountpoint.cc + test/webfuse/tests/adapter/test_uuid_mountpoint.cc + test/webfuse/tests/adapter/test_uuid_mountpoint_factory.cc + test/webfuse/tests/adapter/test_fuse_req.cc + test/webfuse/tests/adapter/jsonrpc/test_util.cc + test/webfuse/tests/adapter/jsonrpc/test_is_request.cc + test/webfuse/tests/adapter/jsonrpc/test_request.cc + test/webfuse/tests/adapter/jsonrpc/test_is_response.cc + test/webfuse/tests/adapter/jsonrpc/test_response.cc + test/webfuse/tests/adapter/jsonrpc/test_server.cc + test/webfuse/tests/adapter/jsonrpc/test_proxy.cc + test/webfuse/tests/provider/test_url.cc + test/webfuse/tests/provider/test_static_filesystem.cc + test/webfuse/tests/provider/test_client_protocol.cc + test/webfuse/tests/integration/test_integration.cc + test/webfuse/tests/integration/server.cc + test/webfuse/tests/integration/provider.cc ) target_include_directories(alltests PRIVATE diff --git a/test/fake_adapter_server.cc b/test/webfuse/fakes/fake_adapter_server.cc similarity index 97% rename from test/fake_adapter_server.cc rename to test/webfuse/fakes/fake_adapter_server.cc index 72a1831..bebd3d9 100644 --- a/test/fake_adapter_server.cc +++ b/test/webfuse/fakes/fake_adapter_server.cc @@ -1,5 +1,5 @@ -#include "fake_adapter_server.hpp" -#include "timeout_watcher.hpp" +#include "webfuse/fakes/fake_adapter_server.hpp" +#include "webfuse/utils/timeout_watcher.hpp" #include "webfuse/core/util.h" #include diff --git a/test/fake_adapter_server.hpp b/test/webfuse/fakes/fake_adapter_server.hpp similarity index 100% rename from test/fake_adapter_server.hpp rename to test/webfuse/fakes/fake_adapter_server.hpp diff --git a/test/mock_authenticator.cc b/test/webfuse/mocks/mock_authenticator.cc similarity index 94% rename from test/mock_authenticator.cc rename to test/webfuse/mocks/mock_authenticator.cc index f2decab..35648ed 100644 --- a/test/mock_authenticator.cc +++ b/test/webfuse/mocks/mock_authenticator.cc @@ -1,4 +1,4 @@ -#include "mock_authenticator.hpp" +#include "webfuse/mocks/mock_authenticator.hpp" #define WF_AUTHENTICATOR_COUNT 3 diff --git a/test/mock_authenticator.hpp b/test/webfuse/mocks/mock_authenticator.hpp similarity index 100% rename from test/mock_authenticator.hpp rename to test/webfuse/mocks/mock_authenticator.hpp diff --git a/test/mock_request.cc b/test/webfuse/mocks/mock_request.cc similarity index 95% rename from test/mock_request.cc rename to test/webfuse/mocks/mock_request.cc index efd8334..c2dd441 100644 --- a/test/mock_request.cc +++ b/test/webfuse/mocks/mock_request.cc @@ -1,4 +1,4 @@ -#include "mock_request.hpp" +#include "webfuse/mocks/mock_request.hpp" #include namespace diff --git a/test/mock_request.hpp b/test/webfuse/mocks/mock_request.hpp similarity index 100% rename from test/mock_request.hpp rename to test/webfuse/mocks/mock_request.hpp diff --git a/test/adapter/jsonrpc/test_is_request.cc b/test/webfuse/tests/adapter/jsonrpc/test_is_request.cc similarity index 100% rename from test/adapter/jsonrpc/test_is_request.cc rename to test/webfuse/tests/adapter/jsonrpc/test_is_request.cc diff --git a/test/adapter/jsonrpc/test_is_response.cc b/test/webfuse/tests/adapter/jsonrpc/test_is_response.cc similarity index 100% rename from test/adapter/jsonrpc/test_is_response.cc rename to test/webfuse/tests/adapter/jsonrpc/test_is_response.cc diff --git a/test/adapter/jsonrpc/test_proxy.cc b/test/webfuse/tests/adapter/jsonrpc/test_proxy.cc similarity index 99% rename from test/adapter/jsonrpc/test_proxy.cc rename to test/webfuse/tests/adapter/jsonrpc/test_proxy.cc index 1355c4e..8f99312 100644 --- a/test/adapter/jsonrpc/test_proxy.cc +++ b/test/webfuse/tests/adapter/jsonrpc/test_proxy.cc @@ -1,7 +1,7 @@ #include #include "webfuse/adapter/impl/jsonrpc/proxy.h" #include "webfuse/adapter/impl/time/timeout_manager.h" -#include "msleep.hpp" +#include "webfuse/utils/msleep.hpp" using webfuse_test::msleep; diff --git a/test/adapter/jsonrpc/test_request.cc b/test/webfuse/tests/adapter/jsonrpc/test_request.cc similarity index 100% rename from test/adapter/jsonrpc/test_request.cc rename to test/webfuse/tests/adapter/jsonrpc/test_request.cc diff --git a/test/adapter/jsonrpc/test_response.cc b/test/webfuse/tests/adapter/jsonrpc/test_response.cc similarity index 100% rename from test/adapter/jsonrpc/test_response.cc rename to test/webfuse/tests/adapter/jsonrpc/test_response.cc diff --git a/test/adapter/jsonrpc/test_server.cc b/test/webfuse/tests/adapter/jsonrpc/test_server.cc similarity index 100% rename from test/adapter/jsonrpc/test_server.cc rename to test/webfuse/tests/adapter/jsonrpc/test_server.cc diff --git a/test/adapter/jsonrpc/test_util.cc b/test/webfuse/tests/adapter/jsonrpc/test_util.cc similarity index 100% rename from test/adapter/jsonrpc/test_util.cc rename to test/webfuse/tests/adapter/jsonrpc/test_util.cc diff --git a/test/adapter/test_authenticator.cc b/test/webfuse/tests/adapter/test_authenticator.cc similarity index 97% rename from test/adapter/test_authenticator.cc rename to test/webfuse/tests/adapter/test_authenticator.cc index 93505a9..07e06e5 100644 --- a/test/adapter/test_authenticator.cc +++ b/test/webfuse/tests/adapter/test_authenticator.cc @@ -1,7 +1,7 @@ #include #include -#include "mock_authenticator.hpp" +#include "webfuse/mocks/mock_authenticator.hpp" #include "webfuse/adapter/impl/authenticator.h" #include "webfuse/adapter/impl/credentials.h" diff --git a/test/adapter/test_authenticators.cc b/test/webfuse/tests/adapter/test_authenticators.cc similarity index 99% rename from test/adapter/test_authenticators.cc rename to test/webfuse/tests/adapter/test_authenticators.cc index 3227e57..6cb8064 100644 --- a/test/adapter/test_authenticators.cc +++ b/test/webfuse/tests/adapter/test_authenticators.cc @@ -3,7 +3,7 @@ #include "webfuse/adapter/impl/authenticators.h" #include "webfuse/adapter/impl/credentials.h" -#include "mock_authenticator.hpp" +#include "webfuse/mocks/mock_authenticator.hpp" using ::testing::_; using ::testing::Return; diff --git a/test/adapter/test_credentials.cc b/test/webfuse/tests/adapter/test_credentials.cc similarity index 100% rename from test/adapter/test_credentials.cc rename to test/webfuse/tests/adapter/test_credentials.cc diff --git a/test/adapter/test_fuse_req.cc b/test/webfuse/tests/adapter/test_fuse_req.cc similarity index 100% rename from test/adapter/test_fuse_req.cc rename to test/webfuse/tests/adapter/test_fuse_req.cc diff --git a/test/adapter/test_mountpoint.cc b/test/webfuse/tests/adapter/test_mountpoint.cc similarity index 100% rename from test/adapter/test_mountpoint.cc rename to test/webfuse/tests/adapter/test_mountpoint.cc diff --git a/test/adapter/test_response_parser.cc b/test/webfuse/tests/adapter/test_response_parser.cc similarity index 100% rename from test/adapter/test_response_parser.cc rename to test/webfuse/tests/adapter/test_response_parser.cc diff --git a/test/adapter/test_server.cc b/test/webfuse/tests/adapter/test_server.cc similarity index 100% rename from test/adapter/test_server.cc rename to test/webfuse/tests/adapter/test_server.cc diff --git a/test/adapter/test_server_config.cc b/test/webfuse/tests/adapter/test_server_config.cc similarity index 99% rename from test/adapter/test_server_config.cc rename to test/webfuse/tests/adapter/test_server_config.cc index cb176d6..f85aa92 100644 --- a/test/adapter/test_server_config.cc +++ b/test/webfuse/tests/adapter/test_server_config.cc @@ -2,7 +2,7 @@ #include "webfuse/adapter/server_config.h" #include "webfuse/adapter/impl/server_config.h" #include "webfuse/adapter/impl/authenticator.h" -#include "tempdir.hpp" +#include "webfuse/utils/tempdir.hpp" using webfuse_test::TempDir; diff --git a/test/adapter/test_timepoint.cc b/test/webfuse/tests/adapter/test_timepoint.cc similarity index 95% rename from test/adapter/test_timepoint.cc rename to test/webfuse/tests/adapter/test_timepoint.cc index 85de35d..8b0db97 100644 --- a/test/adapter/test_timepoint.cc +++ b/test/webfuse/tests/adapter/test_timepoint.cc @@ -1,6 +1,6 @@ #include -#include "msleep.hpp" +#include "webfuse/utils/msleep.hpp" #include "webfuse/adapter/impl/time/timepoint.h" using webfuse_test::msleep; diff --git a/test/adapter/test_timer.cc b/test/webfuse/tests/adapter/test_timer.cc similarity index 99% rename from test/adapter/test_timer.cc rename to test/webfuse/tests/adapter/test_timer.cc index b838147..d554f2d 100644 --- a/test/adapter/test_timer.cc +++ b/test/webfuse/tests/adapter/test_timer.cc @@ -2,7 +2,7 @@ #include -#include "msleep.hpp" +#include "webfuse/utils/msleep.hpp" #include "webfuse/adapter/impl/time/timer.h" #include "webfuse/adapter/impl/time/timeout_manager.h" diff --git a/test/adapter/test_uuid_mountpoint.cc b/test/webfuse/tests/adapter/test_uuid_mountpoint.cc similarity index 96% rename from test/adapter/test_uuid_mountpoint.cc rename to test/webfuse/tests/adapter/test_uuid_mountpoint.cc index 8bff760..7549b84 100644 --- a/test/adapter/test_uuid_mountpoint.cc +++ b/test/webfuse/tests/adapter/test_uuid_mountpoint.cc @@ -1,7 +1,7 @@ #include -#include "tempdir.hpp" -#include "file_utils.hpp" +#include "webfuse/utils/tempdir.hpp" +#include "webfuse/utils/file_utils.hpp" #include "webfuse_adapter.h" #include "webfuse/adapter/impl/uuid_mountpoint.h" diff --git a/test/adapter/test_uuid_mountpoint_factory.cc b/test/webfuse/tests/adapter/test_uuid_mountpoint_factory.cc similarity index 96% rename from test/adapter/test_uuid_mountpoint_factory.cc rename to test/webfuse/tests/adapter/test_uuid_mountpoint_factory.cc index b097ae0..dca941f 100644 --- a/test/adapter/test_uuid_mountpoint_factory.cc +++ b/test/webfuse/tests/adapter/test_uuid_mountpoint_factory.cc @@ -1,8 +1,8 @@ #include #include "webfuse_adapter.h" #include "webfuse/adapter/impl/uuid_mountpoint_factory.h" -#include "tempdir.hpp" -#include "file_utils.hpp" +#include "webfuse/utils/tempdir.hpp" +#include "webfuse/utils/file_utils.hpp" using webfuse_test::TempDir; using webfuse_test::is_dir; diff --git a/test/core/test_base64.cc b/test/webfuse/tests/core/test_base64.cc similarity index 100% rename from test/core/test_base64.cc rename to test/webfuse/tests/core/test_base64.cc diff --git a/test/core/test_container_of.cc b/test/webfuse/tests/core/test_container_of.cc similarity index 100% rename from test/core/test_container_of.cc rename to test/webfuse/tests/core/test_container_of.cc diff --git a/test/core/test_message.cc b/test/webfuse/tests/core/test_message.cc similarity index 100% rename from test/core/test_message.cc rename to test/webfuse/tests/core/test_message.cc diff --git a/test/core/test_message_queue.cc b/test/webfuse/tests/core/test_message_queue.cc similarity index 100% rename from test/core/test_message_queue.cc rename to test/webfuse/tests/core/test_message_queue.cc diff --git a/test/core/test_path.cc b/test/webfuse/tests/core/test_path.cc similarity index 100% rename from test/core/test_path.cc rename to test/webfuse/tests/core/test_path.cc diff --git a/test/core/test_slist.cc b/test/webfuse/tests/core/test_slist.cc similarity index 100% rename from test/core/test_slist.cc rename to test/webfuse/tests/core/test_slist.cc diff --git a/test/core/test_status.cc b/test/webfuse/tests/core/test_status.cc similarity index 100% rename from test/core/test_status.cc rename to test/webfuse/tests/core/test_status.cc diff --git a/test/core/test_string.cc b/test/webfuse/tests/core/test_string.cc similarity index 100% rename from test/core/test_string.cc rename to test/webfuse/tests/core/test_string.cc diff --git a/test/integration/provider.cc b/test/webfuse/tests/integration/provider.cc similarity index 95% rename from test/integration/provider.cc rename to test/webfuse/tests/integration/provider.cc index 3ee4285..49c334a 100644 --- a/test/integration/provider.cc +++ b/test/webfuse/tests/integration/provider.cc @@ -1,10 +1,10 @@ -#include "integration/provider.hpp" +#include "webfuse/tests/integration/provider.hpp" #include "webfuse_provider.h" #include "webfuse/provider/impl/client.h" #include #include #include -#include "msleep.hpp" +#include "webfuse/utils/msleep.hpp" namespace webfuse_test { diff --git a/test/integration/provider.hpp b/test/webfuse/tests/integration/provider.hpp similarity index 100% rename from test/integration/provider.hpp rename to test/webfuse/tests/integration/provider.hpp diff --git a/test/integration/server.cc b/test/webfuse/tests/integration/server.cc similarity index 95% rename from test/integration/server.cc rename to test/webfuse/tests/integration/server.cc index 0659efe..1360934 100644 --- a/test/integration/server.cc +++ b/test/webfuse/tests/integration/server.cc @@ -1,4 +1,4 @@ -#include "integration/server.hpp" +#include "webfuse/tests/integration/server.hpp" #include #include #include @@ -6,7 +6,7 @@ #include #include "webfuse_adapter.h" #include "webfuse/adapter/impl/server.h" -#include "msleep.hpp" +#include "webfuse/utils/msleep.hpp" #define WF_PATH_MAX (100) diff --git a/test/integration/server.hpp b/test/webfuse/tests/integration/server.hpp similarity index 100% rename from test/integration/server.hpp rename to test/webfuse/tests/integration/server.hpp diff --git a/test/integration/test_integration.cc b/test/webfuse/tests/integration/test_integration.cc similarity index 96% rename from test/integration/test_integration.cc rename to test/webfuse/tests/integration/test_integration.cc index 8bd21c6..203856c 100644 --- a/test/integration/test_integration.cc +++ b/test/webfuse/tests/integration/test_integration.cc @@ -1,6 +1,6 @@ #include -#include "integration/server.hpp" -#include "integration/provider.hpp" +#include "webfuse/tests/integration/server.hpp" +#include "webfuse/tests/integration/provider.hpp" #include #include @@ -15,7 +15,7 @@ #include #include "webfuse/core/lws_log.h" -#include "die_if.hpp" +#include "webfuse/utils/die_if.hpp" using webfuse_test::Server; using webfuse_test::Provider; diff --git a/test/provider/test_client_protocol.cc b/test/webfuse/tests/provider/test_client_protocol.cc similarity index 97% rename from test/provider/test_client_protocol.cc rename to test/webfuse/tests/provider/test_client_protocol.cc index 4e78f8e..ef058f7 100644 --- a/test/provider/test_client_protocol.cc +++ b/test/webfuse/tests/provider/test_client_protocol.cc @@ -3,7 +3,7 @@ #include #include -#include "fake_adapter_server.hpp" +#include "webfuse/fakes/fake_adapter_server.hpp" #include #include diff --git a/test/provider/test_static_filesystem.cc b/test/webfuse/tests/provider/test_static_filesystem.cc similarity index 98% rename from test/provider/test_static_filesystem.cc rename to test/webfuse/tests/provider/test_static_filesystem.cc index e7db28e..64a2736 100644 --- a/test/provider/test_static_filesystem.cc +++ b/test/webfuse/tests/provider/test_static_filesystem.cc @@ -4,7 +4,7 @@ #include "webfuse/provider/client_config.h" #include "webfuse/provider/impl/client_config.h" -#include "mock_request.hpp" +#include "webfuse/mocks/mock_request.hpp" using webfuse_test::request_create; using webfuse_test::MockRequest; diff --git a/test/provider/test_url.cc b/test/webfuse/tests/provider/test_url.cc similarity index 100% rename from test/provider/test_url.cc rename to test/webfuse/tests/provider/test_url.cc diff --git a/test/die_if.cc b/test/webfuse/utils/die_if.cc similarity index 80% rename from test/die_if.cc rename to test/webfuse/utils/die_if.cc index 3eff5ae..bd8dd70 100644 --- a/test/die_if.cc +++ b/test/webfuse/utils/die_if.cc @@ -1,4 +1,4 @@ -#include "die_if.hpp" +#include "webfuse/utils/die_if.hpp" #include namespace webfuse_test diff --git a/test/die_if.hpp b/test/webfuse/utils/die_if.hpp similarity index 100% rename from test/die_if.hpp rename to test/webfuse/utils/die_if.hpp diff --git a/test/file_utils.cc b/test/webfuse/utils/file_utils.cc similarity index 94% rename from test/file_utils.cc rename to test/webfuse/utils/file_utils.cc index 0d3ff81..7a3d29c 100644 --- a/test/file_utils.cc +++ b/test/webfuse/utils/file_utils.cc @@ -1,4 +1,4 @@ -#include "file_utils.hpp" +#include "webfuse/utils/file_utils.hpp" #include #include diff --git a/test/file_utils.hpp b/test/webfuse/utils/file_utils.hpp similarity index 100% rename from test/file_utils.hpp rename to test/webfuse/utils/file_utils.hpp diff --git a/test/msleep.cc b/test/webfuse/utils/msleep.cc similarity index 91% rename from test/msleep.cc rename to test/webfuse/utils/msleep.cc index 5f76e49..659bb81 100644 --- a/test/msleep.cc +++ b/test/webfuse/utils/msleep.cc @@ -1,4 +1,4 @@ -#include "msleep.hpp" +#include "webfuse/utils/msleep.hpp" #include namespace webfuse_test diff --git a/test/msleep.hpp b/test/webfuse/utils/msleep.hpp similarity index 100% rename from test/msleep.hpp rename to test/webfuse/utils/msleep.hpp diff --git a/test/tempdir.cc b/test/webfuse/utils/tempdir.cc similarity index 92% rename from test/tempdir.cc rename to test/webfuse/utils/tempdir.cc index 040aed1..31dce25 100644 --- a/test/tempdir.cc +++ b/test/webfuse/utils/tempdir.cc @@ -1,5 +1,5 @@ #include "webfuse/core/string.h" -#include "tempdir.hpp" +#include "webfuse/utils/tempdir.hpp" #include #include diff --git a/test/tempdir.hpp b/test/webfuse/utils/tempdir.hpp similarity index 100% rename from test/tempdir.hpp rename to test/webfuse/utils/tempdir.hpp diff --git a/test/timeout_watcher.cc b/test/webfuse/utils/timeout_watcher.cc similarity index 93% rename from test/timeout_watcher.cc rename to test/webfuse/utils/timeout_watcher.cc index 7e3bb52..8d9add7 100644 --- a/test/timeout_watcher.cc +++ b/test/webfuse/utils/timeout_watcher.cc @@ -1,4 +1,4 @@ -#include "timeout_watcher.hpp" +#include "webfuse/utils/timeout_watcher.hpp" #include using std::chrono::milliseconds; diff --git a/test/timeout_watcher.hpp b/test/webfuse/utils/timeout_watcher.hpp similarity index 100% rename from test/timeout_watcher.hpp rename to test/webfuse/utils/timeout_watcher.hpp