Skip to content

Commit

Permalink
tests: bsock_test_connection_setup works
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Dec 6, 2019
1 parent c30a51e commit c1f75c8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/src/tests/CMakeLists.txt
Expand Up @@ -126,9 +126,9 @@ if(GMOCK_FOUND)
ENDIF()

bareos_add_test( lib_tests "alist_test.cc;bareos_test_sockets.cc;dlist_test.cc;htable_test.cc;qualified_resource_name_type_converter_test.cc;${PROJECT_SOURCE_DIR}/src/filed/evaluate_job_command.cc" "stored_objects;bareossd;bareos;${JANSSON_LIBRARIES};${GTEST_LIBRARIES};${GTEST_MAIN_LIBRARIES}" "")
bareos_add_test( bsock_test_connection_setup "${SSL_UNIT_TEST_FILES}" "${LINK_LIBRARIES}" "")

IF(NOT HAVE_WIN32)
bareos_add_test( bsock_test_connection_setup "${SSL_UNIT_TEST_FILES}" "${LINK_LIBRARIES}" "")
bareos_add_test( watchdog_timer "" "bareos;${GTEST_LIBRARIES};${GTEST_MAIN_LIBRARIES}" "")
bareos_add_test( test_bsock "bareos_test_sockets.cc;bsock_constructor_test.cc;bsock_cert_verify_common_names_test.cc;create_resource.cc;${SSL_UNIT_TEST_FILES}" "${LINK_LIBRARIES}" "-DCERTDIR=\"${CMAKE_CURRENT_SOURCE_DIR}/configs/test_bsock/tls\"")
endif()
9 changes: 8 additions & 1 deletion core/src/tests/bsock_constructor_test.cc
@@ -1,7 +1,7 @@
/*
BAREOS® - Backup Archiving REcovery Open Sourced
Copyright (C) 2018-2018 Bareos GmbH & Co. KG
Copyright (C) 2018-2019 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
Expand All @@ -18,7 +18,14 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#if defined(HAVE_MINGW)
#include "include/bareos.h"
#include "gtest/gtest.h"
#else
#include "gtest/gtest.h"
#include "include/bareos.h"
#endif

#include <memory>
#include <stdlib.h>

Expand Down
4 changes: 1 addition & 3 deletions core/src/tests/bsock_test_connection_setup.cc
Expand Up @@ -51,9 +51,7 @@ bool DoReloadConfig() { return false; }
static void InitSignalHandler()
{
struct sigaction sig {
{
0
}
(0)
};
sig.sa_handler = signal_handler;
sigaction(SIGUSR2, &sig, nullptr);
Expand Down

0 comments on commit c1f75c8

Please sign in to comment.