Skip to content

Commit 8c78d43

Browse files
author
Razvan Becheriu
committed
[#3333] use #3463 fix for radius
1 parent da38131 commit 8c78d43

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/ddns_tuning_messages.cc -diff merge=ours
2-
/ddns_tuning_messages.h -diff merge=ours
1+
/ddns_tuning_messages.cc -diff merge=ours
2+
/ddns_tuning_messages.h -diff merge=ours

src/hooks/dhcp/radius/libloadtests/load_unload_unittests.cc

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2020-2023 Internet Systems Consortium, Inc. ("ISC")
1+
// Copyright (C) 2018-2025 Internet Systems Consortium, Inc. ("ISC")
22
//
33
// This Source Code Form is subject to the terms of the Mozilla Public
44
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -37,33 +37,38 @@ class RadiusLibLoadTest : public isc::test::LibLoadTest {
3737
/// Removes files that may be left over from previous tests
3838
virtual ~RadiusLibLoadTest() {
3939
}
40+
41+
/// @brief Creates a valid set of radius parameters.
42+
virtual ElementPtr validConfigParams() {
43+
ElementPtr params = Element::createMap();
44+
params->set("dictionary", Element::create(TEST_DICTIONARY));
45+
return (params);
46+
}
4047
};
4148

4249
// Simple test that checks the library can be loaded and unloaded several times.
4350
TEST_F(RadiusLibLoadTest, validLoad) {
44-
ElementPtr params = Element::createMap();
45-
params->set("dictionary", Element::create(TEST_DICTIONARY));
46-
validDaemonTest("kea-dhcp4", AF_INET, params);
47-
validDaemonTest("kea-dhcp6", AF_INET6, params);
51+
validDaemonTest("kea-dhcp4", AF_INET, valid_params_);
52+
validDaemonTest("kea-dhcp6", AF_INET6, valid_params_);
4853
}
4954

5055
// Simple test that checks the library cannot by loaded by invalid daemons.
5156
TEST_F(RadiusLibLoadTest, invalidDaemonLoad) {
5257
// V4 is invalid when family is AF_INET6
53-
invalidDaemonTest("kea-dhcp4", AF_INET6);
58+
invalidDaemonTest("kea-dhcp4", AF_INET6, valid_params_);
5459

5560
// V6 is invalid when family is AF_INET
56-
invalidDaemonTest("kea-dhcp6", AF_INET);
61+
invalidDaemonTest("kea-dhcp6", AF_INET, valid_params_);
5762

58-
invalidDaemonTest("kea-ctrl-agent", AF_INET);
59-
invalidDaemonTest("kea-dhcp-ddns", AF_INET);
60-
invalidDaemonTest("bogus", AF_INET);
63+
invalidDaemonTest("kea-ctrl-agent", AF_INET, valid_params_);
64+
invalidDaemonTest("kea-dhcp-ddns", AF_INET, valid_params_);
65+
invalidDaemonTest("bogus", AF_INET, valid_params_);
6166
}
6267

6368
// Simple test that checks the library does not accept unknown parameters.
6469
TEST_F(RadiusLibLoadTest, unknown) {
6570
// Prepare parameters for the callout parameters library.
66-
ElementPtr params = Element::createMap();
71+
ElementPtr params = valid_params_;
6772
params->set("foobar", Element::create(1));
6873
invalidDaemonTest("kea-dhcp4", AF_INET, params);
6974
}

0 commit comments

Comments
 (0)