Shawn Routhier [Fri, 27 May 2016 04:36:36 +0000 (21:36 -0700)]
[trac4480] Update per review comments
Create a LogContentTest class and move the functions to manipulate
a test to check on the log output there. This will make it available
for other tests in the future. As part of this bundle a bit more
work into the class to minimze the calls in the test routines.
Where reasonable remove extra copys of the values being pushed
onto the stack - instead of generating a copy just for the logging
simply use the value from the top of the stack directly.
Swtich to using single quotes around text values.
Added some more description in the classify document
Shawn Routhier [Fri, 20 May 2016 04:56:18 +0000 (21:56 -0700)]
[4480] Add debug logging for evaluation of classification expressions
This patch adds a set of log messages to indicate what values are
being popped from or pushed to the classification value stack. This
is meant to be used by an administrator when debugging the expression
statements.
Stephen Morris [Tue, 10 May 2016 14:03:02 +0000 (15:03 +0100)]
[4485] Change type of variables to overcome compiler objections
One compiler was objecting to placing the address of a size_t variable
into a variable declared as "unsigned long*". Changing the
declaration from "size_t" to "unsigned long" fixes the problem.
src/bin/dhcp4/tests/hooks_unittest.cc
TEST_F(LoadUnloadDhcpv4SrvTest, unloadLibaries) - new test that
verifies Hooks libraries are unloaded by the Dhcpv4Srv destructor
src/bin/dhcp6/tests/hooks_unittest.cc
TEST_F(LoadUnloadDhcpv6SrvTest, unloadLibaries) - new test that
verifies Hooks libraries are unloaded by the Dhcpv4Srv destructor
[4492] Explicitly unload hook libraries prior during shutdown
A call to HooksManager::getHooksManager().unloadLibraries() was added to
the destructors Dhcpv4Srv::~Dhcpv4Srv() and Dhcpv6Srv::~Dhcpv6Srv(). This
ensures hook libraries are unloaded prior to static objects.
[4297] Addressed review comments:
- returnining different values in callout_params_library.cc
- returned values are now described for getParameter
- corrected index syntax comment in getParameter
- added missing include
- hooks_user.dox updated
- hooks unit test moved, so it is now next to other hooks tests
[4239] Added drop scripts for both MySQL and Postgresql
Rather than use hard-coded lists or query logic for dropping the
database all MySQL and Posgresql tests use new drop scripts
added to src/bind/admin/scripts.
src/bin/admin/scripts/mysql/dhcpdb_drop.mysql
- New SQL script to drop a MySQL database
src/bin/admin/scripts/pgsql/dhcpdb_drop.pgsql
- New SQL script to drop a Postgresql database
src/bin/admin/tests/mysql_tests.sh.in
- mysql_wipe() - modified to use new drop script
src/bin/admin/tests/pgsql_tests.sh.in
- pgsql_wipe() modified to use new drop script
src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
- TEST(MySqlOpenTest, OpenDatabase) - added show_err=true
to destroyMySQLSchema() calls
src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
- TEST(PgSqlOpenTest, OpenDatabase) - added show_err=true
to destroyMySQLSchema() calls
src/lib/dhcpsrv/testutils/mysql_schema.cc
- destroyMySQLSchema(bool show_err) - modified to use the new
drop script and accept show_err parameter
src/lib/dhcpsrv/testutils/pgsql_schema.cc
- destroyPgSQLSchema(bool show_err) - modified to use the new
drop script and accept show_err parameter
[4239] MySQL and Postgresql unit tests use production schema create scripts
src/lib/dhcpsrv/testutils/schema.h
src/lib/dhcpsrv/testutils/schema.cc
New files that contain constants and functions common to RDBMS
testing
src/lib/dhcpsrv/testutils/pgsql_schema.h
src/lib/dhcpsrv/testutils/pgsql_schema.cc
New files that contain constants and functions needed for
Posgresql testing
src/lib/dhcpsrv/testutils/mysql_schema.cc
src/lib/dhcpsrv/testutils/mysql_schema.h
Removed common constants and functions
Added MYSQL_VALID_TYPE
runMySQLScript() - new function to submit a script to MySQL
src/lib/dhcpsrv/pgsql_lease_mgr.cc
PgSqlLease6Exchange - replaced uint32_t iaid member with Uiaid union
instance. This permits the value to be safely stored in the database
as an INT (signed 4-byte value)
getColumnValue()- added int32_t variant of this method
[4239] MySQL unit tests in dhcpsrv now use production db create script
src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
TEST(MySqlOpenTest, OpenDatabase) - pass in show_err=true for call
to createMySQLSchema()
src/lib/dhcpsrv/testutils/Makefile.am
- Added definition of TEST_ADMIN_SCRIPTS_DIR
- removed schema_mysql_copy.h
src/lib/dhcpsrv/testutils/mysql_schema.cc
- Removed include of schema_mysql_copy.h
- destroyMySQLSchema() - now contains destroy_statment[] formerly
defined in schema_mysql_copy.h
- createMySQLSchema() - Creates the database through command line
invocation of MySQL cli, mysql, passing it the production database
creation script
[4259] kea-dhcp6 now supports replace-client-name modes
src/bin/dhcp6/dhcp6_messages.mes
- Added new log message, DHCP6_DDNS_SUPPLY_FQDN
src/bin/dhcp6/dhcp6_srv.cc
- Dhcpv6Srv::processClientFqdn() - modified to support the name
replacement modes
src/bin/dhcp6/tests/fqdn_unittest.cc
- FqdnDhcpv6SrvTest::testReplaceClientNameMode() new method which tests
a server's handling of a single client packet for a given
replace-client-name mode.
- TEST_F(FqdnDhcpv6SrvTest, replaceClientNameModeTest) - new test which
exercises the permutations of client packets and replace-client-name
modes.
[4259] kea-dhcp4 now supports replace-client-name modes
src/bin/dhcp4/dhcp4_messages.mes
- Added new log message DHCP4_SUPPLY_HOSTNAME
src/bin/dhcp4/dhcp4_srv.cc
- Dhcpv4Srv::processClientName() - pushed lack of host option in the
client request down into processHostoption()
- Dhcpv4Srv::processHostnameOption() - modified to support the new name
replacement modes
src/bin/dhcp4/tests/fqdn_unittest.cc
- NameDhcpv4SrvTest:: testReplaceClientNameMode() - new method which
tests a server's handling of a single client packet for a given
replace-client-name mode.
- TEST_F(NameDhcpv4SrvTest, replaceClientNameModeTest) - new test which
exercises the permutations of client packets and replace-client-name
modes.