1
0
mirror of https://github.com/falk-werner/webfused synced 2024-10-27 20:44:08 +00:00

refactored tests

This commit is contained in:
Falk Werner 2020-03-20 13:48:58 +01:00
parent 364d19bdea
commit 933789b045
32 changed files with 51 additions and 50 deletions

View File

@ -119,32 +119,33 @@ include(GoogleTest)
pkg_check_modules(GMOCK gmock)
add_executable(alltests
test/mock_config_builder.cc
test/mock_logger.cc
test/mock_credentials.cc
test/mock_settings.cc
test/mock_pam.cc
test/mock_libconfig.cc
test/mock_linux.cc
test/mock_server.cc
test/test_config_factory.cc
test/test_config.cc
test/test_settings.cc
test/test_auth_factory.cc
test/test_file_authenticator.cc
test/test_pam_authenticator.cc
test/test_mountpoint_factory.cc
test/test_log.cc
test/test_log_manager.cc
test/test_stderr_logger.cc
test/test_syslog_logger.cc
test/test_daemon.cc
test/test_change_user.cc
test/test_userdb.cc
test/mock/config_builder.cc
test/mock/logger.cc
test/mock/credentials.cc
test/mock/settings.cc
test/mock/pam.cc
test/mock/libconfig.cc
test/mock/linux.cc
test/mock/server.cc
test/config/factory.cc
test/config/config.cc
test/config/settings.cc
test/auth/factory.cc
test/auth/file_authenticator.cc
test/auth/pam_authenticator.cc
test/log/log.cc
test/log/log_manager.cc
test/log/stderr_logger.cc
test/log/syslog_logger.cc
test/daemon.cc
test/change_user.cc
test/mountpoint_factory.cc
test/userdb.cc
)
target_include_directories(alltests PRIVATE
src
test
${GMOCK_INCLUDE_DIRS}
${GTEST_INCLUDE_DIRS}
)

View File

@ -2,7 +2,7 @@
#include "webfused/auth/factory.h"
#include "webfused/auth/authenticator.h"
#include "webfused/log/log.h"
#include "mock_logger.hpp"
#include "mock/logger.hpp"
using ::testing::_;
using ::webfused_test::MockLogger;

View File

@ -3,8 +3,8 @@
#include "webfused/config/settings.h"
#include "webfused/auth/factory.h"
#include "mock_credentials.hpp"
#include "mock_settings.hpp"
#include "mock/credentials.hpp"
#include "mock/settings.hpp"
#include <gtest/gtest.h>
#include <libconfig.h>

View File

@ -3,9 +3,9 @@
#include "webfused/config/settings.h"
#include "webfused/auth/factory.h"
#include "mock_credentials.hpp"
#include "mock_settings.hpp"
#include "mock_pam.hpp"
#include "mock/credentials.hpp"
#include "mock/settings.hpp"
#include "mock/pam.hpp"
#include <gtest/gtest.h>

View File

@ -1,5 +1,5 @@
#include "webfused/change_user.h"
#include "mock_linux.hpp"
#include "mock/linux.hpp"
#include <gtest/gtest.h>
using ::webfused_test::MockLinux;

View File

@ -1,11 +1,11 @@
#include <gtest/gtest.h>
#include "webfused/config/config.h"
#include "webfused/config/config_intern.h"
#include "mock_settings.hpp"
#include "mock/settings.hpp"
#include "webfused/log/logger.h"
#include "webfused/log/log.h"
#include "mock_logger.hpp"
#include "mock/logger.hpp"
using ::webfused_test::MockLogger;
using ::testing::_;

View File

@ -3,9 +3,9 @@
#include "webfused/config/factory.h"
#include "webfused/log/logger.h"
#include "webfused/log/log.h"
#include "mock_logger.hpp"
#include "mock_config_builder.hpp"
#include "mock_libconfig.hpp"
#include "mock/logger.hpp"
#include "mock/config_builder.hpp"
#include "mock/libconfig.hpp"
using ::testing::_;
using ::testing::Return;

View File

@ -1,6 +1,6 @@
#include "webfused/daemon.h"
#include "mock_server.hpp"
#include "mock/server.hpp"
#include <gtest/gtest.h>
#include <cstdlib>

View File

@ -3,7 +3,7 @@
#include "webfused/log/logger.h"
#include "webfused/log/log.h"
#include "mock_logger.hpp"
#include "mock/logger.hpp"
using ::testing::_;
using ::testing::StrEq;

View File

@ -3,7 +3,7 @@
#include "webfused/log/logger.h"
#include "webfused/log/log.h"
#include "mock_settings.hpp"
#include "mock/settings.hpp"
#include <gtest/gtest.h>
#include <stddef.h>

View File

@ -1,4 +1,4 @@
#include "mock_config_builder.hpp"
#include "mock/config_builder.hpp"
extern "C"
{

View File

@ -1,4 +1,4 @@
#include "mock_credentials.hpp"
#include "mock/credentials.hpp"
extern "C"

View File

@ -1,5 +1,5 @@
#include "mock_libconfig.hpp"
#include "wrap_utils.hpp"
#include "mock/libconfig.hpp"
#include "util/wrap.hpp"
extern "C"
{

View File

@ -1,5 +1,5 @@
#include "mock_linux.hpp"
#include "wrap_utils.hpp"
#include "mock/linux.hpp"
#include "util/wrap.hpp"
extern "C"
{

View File

@ -1,4 +1,4 @@
#include "mock_logger.hpp"
#include "mock/logger.hpp"
#include "webfused/log/logger.h"
#include "webfused/log/log.h"

View File

@ -1,4 +1,4 @@
#include "mock_pam.hpp"
#include "mock/pam.hpp"
extern "C"
{

View File

@ -1,5 +1,5 @@
#include "mock_server.hpp"
#include "wrap_utils.hpp"
#include "mock/server.hpp"
#include "util/wrap.hpp"
extern "C"
{

View File

@ -1,4 +1,4 @@
#include "mock_settings.hpp"
#include "mock/settings.hpp"
extern "C"
{

View File

@ -1,5 +1,5 @@
#ifndef WFD_WRAP_UTILS_HPP
#define WFD_WRAP_UTILS_HPP
#ifndef WFD_UTIL_WRAP_HPP
#define WFD_UTIL_WRAP_HPP
#define WFD_WRAP_FUNC0( GLOBAL_VAR, RETURN_TYPE, FUNC_NAME ) \
extern RETURN_TYPE __real_ ## FUNC_NAME (); \