Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
f15dee70
Commit
f15dee70
authored
Mar 04, 2017
by
Francis Dupont
Browse files
[5145b] And D2 client config short cut unit tests
parent
3f2ee8d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
View file @
f15dee70
...
...
@@ -1858,29 +1858,6 @@ TEST_F(ParseConfigTest, parserDefaultsD2Config) {
/// @brief Check various invalid D2 client configurations.
TEST_F
(
ParseConfigTest
,
invalidD2Config
)
{
std
::
string
invalid_shortcuts
[]
=
{
// Must supply at least enable-updates
"{
\"
dhcp-ddns
\"
:"
" {"
" }"
"}"
,
// Enable-updates must be a boolean
"{
\"
dhcp-ddns
\"
:"
" {"
"
\"
enable-updates
\"
: 0"
" }"
"}"
,
// stop
""
};
int
i
=
0
;
while
(
!
invalid_shortcuts
[
i
].
empty
())
{
// Verify that the configuration string parsing throws
EXPECT_THROW
(
parseConfiguration
(
invalid_shortcuts
[
i
]),
DhcpConfigError
);
i
++
;
}
std
::
string
invalid_configs
[]
=
{
// Must supply qualifying-suffix when updates are enabled
"{
\"
dhcp-ddns
\"
:"
...
...
@@ -2036,7 +2013,7 @@ TEST_F(ParseConfigTest, invalidD2Config) {
// Iterate through the invalid configuration strings, attempting to
// parse each one. They should fail to parse, but fail gracefully.
D2ClientConfigPtr
current_config
;
i
=
0
;
int
i
=
0
;
while
(
!
invalid_configs
[
i
].
empty
())
{
// Verify that the configuration string parses without throwing.
int
rcode
=
parseConfiguration
(
invalid_configs
[
i
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment