mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 09:57:41 +00:00
[#3732] addressed review comments
This commit is contained in:
parent
35f7898b0f
commit
25ea568e12
@ -86,6 +86,8 @@ test(
|
|||||||
kea_agent_tests,
|
kea_agent_tests,
|
||||||
depends: [callout, basic_auth],
|
depends: [callout, basic_auth],
|
||||||
protocol: 'gtest',
|
protocol: 'gtest',
|
||||||
|
is_parallel: false,
|
||||||
|
priority: -1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <dhcp4/json_config_parser.h>
|
#include <dhcp4/json_config_parser.h>
|
||||||
#include <dhcp4/tests/d2_unittest.h>
|
#include <dhcp4/tests/d2_unittest.h>
|
||||||
#include <dhcpsrv/cfgmgr.h>
|
#include <dhcpsrv/cfgmgr.h>
|
||||||
|
#include <testutils/gtest_utils.h>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
@ -298,11 +299,10 @@ TEST_F(Dhcp4SrvD2Test, simpleUDPSend) {
|
|||||||
// invoked as expected. Note that this unit test relies on an attempt to send
|
// invoked as expected. Note that this unit test relies on an attempt to send
|
||||||
// to a server address of 0.0.0.0 port 0 fails, which it does under all OSes
|
// to a server address of 0.0.0.0 port 0 fails, which it does under all OSes
|
||||||
// except Solaris 11 and macOS 15.0.
|
// except Solaris 11 and macOS 15.0.
|
||||||
/// @todo Eventually we should find a way to test this under Solaris.
|
|
||||||
#if (!defined(OS_SOLARIS) && !defined(OS_OSX))
|
|
||||||
TEST_F(Dhcp4SrvD2Test, forceUDPSendFailure) {
|
TEST_F(Dhcp4SrvD2Test, forceUDPSendFailure) {
|
||||||
#else
|
#if (defined(OS_SOLARIS) || defined(OS_OSX))
|
||||||
TEST_F(Dhcp4SrvD2Test, DISABLED_forceUDPSendFailure) {
|
/// @todo Eventually we should find a way to test this under Solaris.
|
||||||
|
SKIP_IF(true);
|
||||||
#endif
|
#endif
|
||||||
// Grab the manager and verify that be default ddns is off
|
// Grab the manager and verify that be default ddns is off
|
||||||
// and a sender was not started.
|
// and a sender was not started.
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <dhcp6/json_config_parser.h>
|
#include <dhcp6/json_config_parser.h>
|
||||||
#include <dhcp6/tests/d2_unittest.h>
|
#include <dhcp6/tests/d2_unittest.h>
|
||||||
#include <dhcpsrv/cfgmgr.h>
|
#include <dhcpsrv/cfgmgr.h>
|
||||||
|
#include <testutils/gtest_utils.h>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
@ -302,11 +303,10 @@ TEST_F(Dhcp6SrvD2Test, simpleUDPSend) {
|
|||||||
// invoked as expected. Note that this unit test relies on an attempt to send
|
// invoked as expected. Note that this unit test relies on an attempt to send
|
||||||
// to a server address of 0.0.0.0 port 0 fails, which it does under all OSs
|
// to a server address of 0.0.0.0 port 0 fails, which it does under all OSs
|
||||||
// except Solaris 11 and macOS 15.0.
|
// except Solaris 11 and macOS 15.0.
|
||||||
/// @todo Eventually we should find a way to test this under Solaris.
|
|
||||||
#if (!defined(OS_SOLARIS) && !defined(OS_OSX))
|
|
||||||
TEST_F(Dhcp6SrvD2Test, forceUDPSendFailure) {
|
TEST_F(Dhcp6SrvD2Test, forceUDPSendFailure) {
|
||||||
#else
|
#if (defined(OS_SOLARIS) || defined(OS_OSX))
|
||||||
TEST_F(Dhcp6SrvD2Test, DISABLED_forceUDPSendFailure) {
|
/// @todo Eventually we should find a way to test this under Solaris.
|
||||||
|
SKIP_IF(true);
|
||||||
#endif
|
#endif
|
||||||
// Grab the manager and verify that be default ddns is off
|
// Grab the manager and verify that be default ddns is off
|
||||||
// and a sender was not started.
|
// and a sender was not started.
|
||||||
|
@ -176,15 +176,9 @@ TEST(MySqlOpenTest, OpenDatabase) {
|
|||||||
MYSQL_VALID_TYPE, INVALID_NAME, VALID_HOST, VALID_USER, VALID_PASSWORD)),
|
MYSQL_VALID_TYPE, INVALID_NAME, VALID_HOST, VALID_USER, VALID_PASSWORD)),
|
||||||
DbOpenError);
|
DbOpenError);
|
||||||
|
|
||||||
#ifndef OS_OSX
|
|
||||||
// Under MacOS, connecting with an invalid host can cause a TCP/IP socket
|
|
||||||
// to be orphaned and never closed. This can interfere with subsequent tests
|
|
||||||
// which attempt to locate and manipulate MySQL client socket descriptor.
|
|
||||||
// In the interests of progress, we'll just avoid this test.
|
|
||||||
EXPECT_THROW(LeaseMgrFactory::create(connectionString(
|
EXPECT_THROW(LeaseMgrFactory::create(connectionString(
|
||||||
MYSQL_VALID_TYPE, VALID_NAME, INVALID_HOST, VALID_USER, VALID_PASSWORD)),
|
MYSQL_VALID_TYPE, VALID_NAME, INVALID_HOST, VALID_USER, VALID_PASSWORD)),
|
||||||
DbOpenError);
|
DbOpenError);
|
||||||
#endif
|
|
||||||
|
|
||||||
EXPECT_THROW(LeaseMgrFactory::create(connectionString(
|
EXPECT_THROW(LeaseMgrFactory::create(connectionString(
|
||||||
MYSQL_VALID_TYPE, VALID_NAME, VALID_HOST, INVALID_USER, VALID_PASSWORD)),
|
MYSQL_VALID_TYPE, VALID_NAME, VALID_HOST, INVALID_USER, VALID_PASSWORD)),
|
||||||
|
@ -5,20 +5,25 @@
|
|||||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <asiolink/asio_wrapper.h>
|
#include <asiolink/asio_wrapper.h>
|
||||||
#include <asiolink/interval_timer.h>
|
#include <asiolink/interval_timer.h>
|
||||||
#include <asiolink/io_address.h>
|
#include <asiolink/io_address.h>
|
||||||
#include <asiolink/io_service.h>
|
#include <asiolink/io_service.h>
|
||||||
#include <asiolink/tcp_acceptor.h>
|
#include <asiolink/tcp_acceptor.h>
|
||||||
#include <asiolink/tcp_endpoint.h>
|
#include <asiolink/tcp_endpoint.h>
|
||||||
#include <boost/noncopyable.hpp>
|
#include <testutils/gtest_utils.h>
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <boost/noncopyable.hpp>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
using namespace isc::asiolink;
|
using namespace isc::asiolink;
|
||||||
namespace ph = std::placeholders;
|
namespace ph = std::placeholders;
|
||||||
|
|
||||||
@ -420,13 +425,12 @@ TEST_F(TCPAcceptorTest, getNative) {
|
|||||||
EXPECT_GE(acceptor_.getNative(), 0);
|
EXPECT_GE(acceptor_.getNative(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// macOS 10.12.3 has a bug which causes the connections to not enter
|
|
||||||
// the TIME-WAIT state and they never get closed.
|
|
||||||
#if !defined (OS_OSX)
|
|
||||||
// Test that TCPAcceptor::close works properly.
|
// Test that TCPAcceptor::close works properly.
|
||||||
TEST_F(TCPAcceptorTest, close) {
|
TEST_F(TCPAcceptorTest, close) {
|
||||||
#else
|
#if defined (OS_OSX)
|
||||||
TEST_F(TCPAcceptorTest, DISABLED_close) {
|
// macOS 10.12.3 has a bug which causes the connections to not enter
|
||||||
|
// the TIME-WAIT state and they never get closed.
|
||||||
|
SKIP_IF(true);
|
||||||
#endif
|
#endif
|
||||||
// Initialize acceptor.
|
// Initialize acceptor.
|
||||||
acceptorOpen();
|
acceptorOpen();
|
||||||
|
@ -5,20 +5,25 @@
|
|||||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <asiolink/asio_wrapper.h>
|
#include <asiolink/asio_wrapper.h>
|
||||||
#include <asiolink/interval_timer.h>
|
#include <asiolink/interval_timer.h>
|
||||||
#include <asiolink/io_address.h>
|
#include <asiolink/io_address.h>
|
||||||
#include <asiolink/io_service.h>
|
#include <asiolink/io_service.h>
|
||||||
#include <asiolink/tcp_endpoint.h>
|
#include <asiolink/tcp_endpoint.h>
|
||||||
#include <asiolink/tls_acceptor.h>
|
#include <asiolink/tls_acceptor.h>
|
||||||
#include <boost/noncopyable.hpp>
|
#include <testutils/gtest_utils.h>
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
#include <gtest/gtest.h>
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <boost/noncopyable.hpp>
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
|
||||||
using namespace isc::asiolink;
|
using namespace isc::asiolink;
|
||||||
using namespace boost::asio;
|
using namespace boost::asio;
|
||||||
namespace ph = std::placeholders;
|
namespace ph = std::placeholders;
|
||||||
@ -426,13 +431,12 @@ TEST_F(TLSAcceptorTest, getNative) {
|
|||||||
EXPECT_GE(acceptor_.getNative(), 0);
|
EXPECT_GE(acceptor_.getNative(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// macOS 10.12.3 has a bug which causes the connections to not enter
|
|
||||||
// the TIME-WAIT state and they never get closed.
|
|
||||||
#if !defined (OS_OSX)
|
|
||||||
// Test that TLSAcceptor::close works properly.
|
// Test that TLSAcceptor::close works properly.
|
||||||
TEST_F(TLSAcceptorTest, close) {
|
TEST_F(TLSAcceptorTest, close) {
|
||||||
#else
|
#if defined (OS_OSX)
|
||||||
TEST_F(TLSAcceptorTest, DISABLED_close) {
|
// macOS 10.12.3 has a bug which causes the connections to not enter
|
||||||
|
// the TIME-WAIT state and they never get closed.
|
||||||
|
SKIP_IF(true);
|
||||||
#endif
|
#endif
|
||||||
// Initialize acceptor.
|
// Initialize acceptor.
|
||||||
acceptorOpen();
|
acceptorOpen();
|
||||||
|
@ -12,4 +12,11 @@ kea_dhcp_ddns_tests = executable(
|
|||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
link_with: [kea_testutils_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
|
link_with: [kea_testutils_lib, kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
|
||||||
)
|
)
|
||||||
test('kea-dhcp-ddns-tests', kea_dhcp_ddns_tests, protocol: 'gtest')
|
test(
|
||||||
|
'kea-dhcp-ddns-tests',
|
||||||
|
kea_dhcp_ddns_tests,
|
||||||
|
protocol: 'gtest',
|
||||||
|
is_parallel: false,
|
||||||
|
priority: -1,
|
||||||
|
timeout: 60,
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user