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
5cf82108
Commit
5cf82108
authored
Mar 15, 2017
by
Francis Dupont
Browse files
[5151] Restored previous code in checkConfigWrite (no routine to parse full config)
parent
3bd3068b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc
View file @
5cf82108
...
...
@@ -271,13 +271,9 @@ public:
// Now check that it is the correct size as reported.
EXPECT_EQ
(
size
,
static_cast
<
int64_t
>
(
f
.
tellg
()));
// Check that it's really a JSON.
ElementPtr
from_file
=
parseJSON
(
exp_txt
);
EXPECT_TRUE
(
from_file
);
// Finally check it is a DHCPv4 config
EXPECT_NO_THROW
(
from_file
=
parseDHCP4
(
exp_txt
,
true
));
EXPECT_TRUE
(
from_file
);
// Finally, check that it's really a JSON.
ElementPtr
from_file
=
Element
::
fromJSONFile
(
exp_txt
);
ASSERT_TRUE
(
from_file
);
}
else
if
(
exp_status
==
CONTROL_RESULT_ERROR
)
{
// Let's check if the reason for failure was given.
...
...
src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc
View file @
5cf82108
...
...
@@ -282,13 +282,9 @@ public:
// Now check that it is the correct size as reported.
EXPECT_EQ
(
size
,
static_cast
<
int64_t
>
(
f
.
tellg
()));
// Check that it's really a JSON.
ElementPtr
from_file
=
parseJSON
(
exp_txt
);
EXPECT_TRUE
(
from_file
);
// Finally check it is a DHCPv6 config
EXPECT_NO_THROW
(
from_file
=
parseDHCP6
(
exp_txt
,
true
));
EXPECT_TRUE
(
from_file
);
// Finally, check that it's really a JSON.
ElementPtr
from_file
=
Element
::
fromJSONFile
(
exp_txt
);
ASSERT_TRUE
(
from_file
);
}
else
if
(
exp_status
==
CONTROL_RESULT_ERROR
)
{
// Let's check if the reason for failure was given.
...
...
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