This commit addresse the more trivial review
comments, it does not include option creation
for networks,subnets, or pools.
Will rebase and address remaining comments.
src/lib/dhcpsrv/cfg_option.*
CfgOption::merge() - new function which merges a given set
of option descriports into the existing set
CfgOption::createDescriptorOption - new function that uses an
option definition factory to create a descriptor's option instance
src/lib/dhcpsrv/tests/cfg_option_unittest.cc
TEST_F(CfgOptionTest, validMerge)
TEST_F(CfgOptionTest, invalidMerge) - new tests
Basic merging works, need to add validation against definitions.
src/bin/dhcp4/tests/config_backend_unittest.cc
TEST_F(Dhcp4CBTest, mergeOptions) - enabled and updated
src/lib/dhcpsrv/cfg_option.*
CfgOption::merge(CfgOption& other) - new method, conformant
to others, that merges/updates a config option from another
src/lib/dhcpsrv/srv_config.cc
SrvConfig::merge4(SrvConfig& other) - modified to
merge configured options
src/lib/dhcpsrv/tests/cfg_option_unittest.cc
TEST_F(CfgOptionTest, merge) - new test
This commit addresse the more trivial review
comments, it does not include option creation
for networks,subnets, or pools.
Will rebase and address remaining comments.
src/share/database/scripts/mysql/wipe_data.sh.in -
New shell script which intelligently deletes data from
the schema IF the schema version matches the expected version
src/lib/mysql/testutils/mysql_schema.*
destroyMySQLSchema() - modfied to default to calling
wipeData(), and only destroying the schema if that fails
or by force flag = true;
createMySQLSchema() - modified to default to calling
wipeData(), and only recreating the schema if that
fails or by force flag = true;
wipeData() - new method which runs the
MySQL wipe_data.sh shell script, passing in the expected
schema version.
src/share/database/scripts/mysql/dhcpdb_create.mysql
createAuditRevisionDHCP4()
createAuditEntryDHCP4()
createAuditRevisionDHCP6()
createAuditEntryDHCP6() - added session variable,
@disable_audit, to allow procedures to be "turned
off" during data wiping.
src/hooks/dhcp/mysql_cb/tests/mysql_cb_dhcp4_mgr_unittest.cc
src/hooks/dhcp/mysql_cb/tests/mysql_cb_dhcp4_unittest.cc
src/lib/dhcpsrv/tests/cfg_db_access_unittest.cc
src/lib/dhcpsrv/tests/host_mgr_unittest.cc
src/lib/dhcpsrv/tests/mysql_host_data_source_unittest.cc
src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
Removed calls to destroy schema from test constructors
Previously it was stored in TEST_DATA_BUILDDIR which resides inside repo sources.
Due to the fact that when repo was located in deep patch creating socket was
failing as max socket patch is about 100 characters. Now it is located
in temp folder managed by Sandbox class. The sandbox directory is created
in test constructor and deleted in destructor. As the temp directory
is in form /tmp/kea-XXXXXX the lnegth is always lower than 1000, so running
the unit tests never fails.
src/lib/dhcpsrv/cfg_option.*
CfgOption::merge() - new function which merges a given set
of option descriports into the existing set
CfgOption::createDescriptorOption - new function that uses an
option definition factory to create a descriptor's option instance
src/lib/dhcpsrv/tests/cfg_option_unittest.cc
TEST_F(CfgOptionTest, validMerge)
TEST_F(CfgOptionTest, invalidMerge) - new tests