2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 14:35:29 +00:00

[#1357] Improved forceUDPSendFailure UTs

This commit is contained in:
Francis Dupont
2020-09-07 17:28:29 +02:00
parent 67d5f9ac0f
commit 137c69a99e
2 changed files with 18 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2014-2020 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -312,7 +312,13 @@ TEST_F(Dhcp4SrvD2Test, DISABLED_forceUDPSendFailure) {
ASSERT_NO_FATAL_FAILURE(configureD2(true, SHOULD_PASS, "0.0.0.0", 0, ASSERT_NO_FATAL_FAILURE(configureD2(true, SHOULD_PASS, "0.0.0.0", 0,
"0.0.0.0", 53001)); "0.0.0.0", 53001));
ASSERT_TRUE(mgr.ddnsEnabled()); ASSERT_TRUE(mgr.ddnsEnabled());
ASSERT_NO_THROW(srv_.startD2()); try {
srv_.startD2();
} catch (const std::exception& ex) {
FAIL() << "startD2 failed with " << ex.what();
} catch (...) {
FAIL() << "startD2 failed";
}
ASSERT_TRUE(mgr.amSending()); ASSERT_TRUE(mgr.amSending());
// Queue up 3 messages. // Queue up 3 messages.

View File

@@ -1,4 +1,4 @@
// Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2014-2020 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -317,7 +317,13 @@ TEST_F(Dhcp6SrvD2Test, DISABLED_forceUDPSendFailure) {
ASSERT_NO_FATAL_FAILURE(configureD2(true, SHOULD_PASS, "::", 0, ASSERT_NO_FATAL_FAILURE(configureD2(true, SHOULD_PASS, "::", 0,
"::", 53001)); "::", 53001));
ASSERT_TRUE(mgr.ddnsEnabled()); ASSERT_TRUE(mgr.ddnsEnabled());
ASSERT_NO_THROW(srv_.startD2()); try {
srv_.startD2();
} catch (const std::exception& ex) {
FAIL() << "startD2 failed with " << ex.what();
} catch (...) {
FAIL() << "startD2 failed";
}
ASSERT_TRUE(mgr.amSending()); ASSERT_TRUE(mgr.amSending());
// Queue up 3 messages. // Queue up 3 messages.