diff options
author | Francis Dupont <fdupont@isc.org> | 2017-11-29 10:27:30 +0100 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2017-11-29 10:27:30 +0100 |
commit | e9198441ddbab33b630fb0f76dfdcf0a378ab001 (patch) | |
tree | 55046116701496fd4683ecdee724ff58fbd0b206 /src/lib/dhcpsrv/tests/client_class_def_unittest.cc | |
parent | [trac5351] regen flex/bison (diff) | |
download | kea-e9198441ddbab33b630fb0f76dfdcf0a378ab001.tar.xz kea-e9198441ddbab33b630fb0f76dfdcf0a378ab001.zip |
[5351] Added client classes. Todo: update doc
Diffstat (limited to 'src/lib/dhcpsrv/tests/client_class_def_unittest.cc')
-rw-r--r-- | src/lib/dhcpsrv/tests/client_class_def_unittest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/tests/client_class_def_unittest.cc b/src/lib/dhcpsrv/tests/client_class_def_unittest.cc index d7dd3ae58e..a4fb2ac007 100644 --- a/src/lib/dhcpsrv/tests/client_class_def_unittest.cc +++ b/src/lib/dhcpsrv/tests/client_class_def_unittest.cc @@ -386,6 +386,9 @@ TEST(ClientClassDef, unparseDef) { ASSERT_NO_THROW(cclass.reset(new ClientClassDef(name, expr))); std::string test = "option[12].text == 'foo'"; cclass->setTest(test); + std::string comment = "bar"; + std::string user_context = "{ \"comment\": \"" + comment + "\" }"; + cclass->setContext(isc::data::Element::fromJSON(user_context)); std::string next_server = "1.2.3.4"; cclass->setNextServer(IOAddress(next_server)); std::string sname = "my-server.example.com"; @@ -395,6 +398,7 @@ TEST(ClientClassDef, unparseDef) { // Unparse it std::string expected = "{\n" + "\"comment\": \"" + comment + "\",\n" "\"name\": \"" + name + "\",\n" "\"test\": \"" + test + "\",\n" "\"next-server\": \"" + next_server + "\",\n" |