Finished V6 UTs. Also re-organized tests so those
that rely on loading the library are now in libloadtests:
tests/lease_cmds4_unittest.cc -> libloadtests/lease_cmds4_unittest.cc
tests/lease_cmds6_unittest.cc -> libloadtests/lease_cmds6_unittest.cc
tests/lease_cmds_unittest.cc -> libloadtests/lease_cmds_unittest.cc
tests/lease_cmds_unittest.h -> libloadtests/lease_cmds_unittest.h
Create new files to house new callout handler tests which rely on
the library being linked in so functions are visible:
new file: tests/lease_cmds_func4_unittest.cc
new file: tests/lease_cmds_func6_unittest.cc
new file: tests/lease_cmds_func_unittest.h
/src/hooks/dhcp/lease_cmds/lease_cmds.cc
LeaseCmdsImpl::leases6Committed() - track but don't
throw on leases that fail so all leases are attempted
/src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes
Tweaked and reordered
/src/hooks/dhcp/lease_cmds/libloadtests/Makefile.am
Added lease_cmds_unittest* here since they rely on
loading the library
/src/hooks/dhcp/lease_cmds/libloadtests/lease_cmds4_unittest.cc
/src/hooks/dhcp/lease_cmds/libloadtests/lease_cmds6_unittest.cc
removed new code relating to callout handler tests as they
use lib functions directly
/src/hooks/dhcp/lease_cmds/tests/Makefile.am
Removed lease_cmds*_unittest.* (now in libloadatests)
Added lease_cmds_func*_unittest.*
/src/hooks/dhcp/lease_cmds/tests/binding_variables_unittest.cc
Moved BindingVariableHandlerTest code into
lease_cmds_func*_unittest.*
/src/hooks/dhcp/lease_cmds/binding_variables.cc
BindingVariableMgr::evaluateVariables() - store empty
evaluated variable values
/src/hooks/dhcp/lease_cmds/tests/binding_variables_unittest.cc
TEST(BindingVariableMgrTest, evaluateVariables4) - new test
TEST(BindingVariableMgrTest, evaluateVariables6) - new test
src/lib/dhcpsrv/lease.cc
fixed spacing
/src/hooks/dhcp/lease_cmds/binding_variables.*
BindingVariableMgr::evaluateVariables() - initial implementation
/src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::updateLease4ExtendedInfo()
AllocEngine::updateLease6ExtendedInfo()
- use Lease::updateUserContextISC()
/src/lib/dhcpsrv/lease.*
bool Lease::updateUserContextISC() - new function that
adds/updates an element in the "ISC" map in the lease's
user-context.
Library can now be configured with binding variables.
/src/hooks/dhcp/lease_cmds/binding_variables.*
Adding BindingVariableMgr class
/src/hooks/dhcp/lease_cmds/lease_cmds_callouts.cc
Adding manager singleton, created and configured
in load()
/src/hooks/dhcp/lease_cmds/libloadtests/load_unload_unittests.cc
Added valid configuration to load tests
/src/hooks/dhcp/lease_cmds/tests/binding_variables_unittest.cc
TEST(BindingVariableMgrTest, validConfigure)
TEST(BindingVariableMgrTest, clearOnConfigure)
TEST(BindingVariableMgrTest, invalidConfigure) - new tests
/src/lib/dhcpsrv/testutils/lib_load_test_fixture.h
Added check of load/unload lib functions to catch
config errors.
/src/hooks/dhcp/lease_cmds/Makefile.am
added new files
/src/hooks/dhcp/lease_cmds/binding_variables.cc
/src/hooks/dhcp/lease_cmds/binding_variables.h
new files
/src/hooks/dhcp/lease_cmds/tests/Makefile.am
added new file
/src/hooks/dhcp/lease_cmds/tests/binding_variables_unittest.cc
new file
/src/lib/dhcp/pkt_filter_lpf.cc
PktFilterLPF::receive() - throw if packet has no data
/src/lib/util/buffer.h
InputBuffer::readVecotr() - avoid peek if read request length is 0
/src/lib/util/tests/buffer_unittest.cc
Updated test