Commit 88a4858d authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[3210] Changes after review:

 - flag => configuration parameter
 - echoClientId test uses ASSERTs rather than EXPECTs
parent 689bd411
XXX. [func] tomek XXX. [func] tomek
b10-dhcp4: Support for sending back client-id (RFC6842) has been b10-dhcp4: Support for sending back client-id (RFC6842) has been
added now. Also a flag (echo-client-id) has been added, so it is added now. Also a configuration parameter (echo-client-id) has
possible to enable backward compatibility (echo-client-id false). been added, so it is possible to enable backward compatibility
("echo-client-id false").
(Trac #3210, git abcd) (Trac #3210, git abcd)
698. [bug] muks 698. [bug] muks
......
...@@ -4426,8 +4426,8 @@ Dhcp4/subnet4 [] list (default) ...@@ -4426,8 +4426,8 @@ Dhcp4/subnet4 [] list (default)
that Kea offers. However, in some cases older devices that do that Kea offers. However, in some cases older devices that do
not support RFC6842 may refuse to accept responses that include not support RFC6842 may refuse to accept responses that include
client-id option. To enable backward compatibility, an optional client-id option. To enable backward compatibility, an optional
flag has been introduced. To configure it, use the following configuration parameter has been introduced. To configure it,
commands:</para> use the following commands:</para>
<screen> <screen>
&gt; <userinput>config add Dhcp4/echo-client-id</userinput> &gt; <userinput>config add Dhcp4/echo-client-id</userinput>
......
...@@ -583,15 +583,15 @@ TEST_F(Dhcp4ParserTest, echoClientId) { ...@@ -583,15 +583,15 @@ TEST_F(Dhcp4ParserTest, echoClientId) {
ElementPtr json_true = Element::fromJSON(config_true); ElementPtr json_true = Element::fromJSON(config_true);
// Let's check the default. It should be true // Let's check the default. It should be true
EXPECT_TRUE(CfgMgr::instance().echoClientId()); ASSERT_TRUE(CfgMgr::instance().echoClientId());
// Now check that "false" configuration is really applied. // Now check that "false" configuration is really applied.
EXPECT_NO_THROW(status = configureDhcp4Server(*srv_, json_false)); EXPECT_NO_THROW(status = configureDhcp4Server(*srv_, json_false));
EXPECT_FALSE(CfgMgr::instance().echoClientId()); ASSERT_FALSE(CfgMgr::instance().echoClientId());
// Now check that "true" configuration is really applied. // Now check that "true" configuration is really applied.
EXPECT_NO_THROW(status = configureDhcp4Server(*srv_, json_true)); EXPECT_NO_THROW(status = configureDhcp4Server(*srv_, json_true));
EXPECT_TRUE(CfgMgr::instance().echoClientId()); ASSERT_TRUE(CfgMgr::instance().echoClientId());
// In any case revert back to the default value (true) // In any case revert back to the default value (true)
CfgMgr::instance().echoClientId(true); CfgMgr::instance().echoClientId(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment