src/share/database/scripts/pgsql
wipe_data.sh.in - new file
doc/devel/unit-tests.dox
Removed MySQL/CQL only comment
several files:
Added commentary and removed superflous calls to destroyPgSQLSchema
src/lib/pgsql/testutils/pgsql_schema.*
destroyPgSQLSchema()
createPgSQLSchema() - modified to support data wiping
wipePgSQLData() - new function
src/lib/pgsql/tests
pgsql_schema.cc
pgsql_schema.h - deleted these. They appear to have
been added by mistake.
Data wiping is on by default, for both MySQL and CQL
(not yet implemented for Postgresql) and but can be
overridden by KEA_TEST_DB_WIPE_DATA_ONLY.
src/lib/mysql/testutils/mysql_schema.*
destroyMySQLSchema()
createMySQLSchema() - added check of softWipeEnabled() to
see if env var has turned it OFF.
Changed CQL to work the same way as MySQL:
src/share/database/scripts/cql
wipe_data.sh.in - new file, replaces soft_wipe.cql
src/lib/cql/testutils/cql_schema.*
destroyCqlSchema() - now destroys the schema
if data wipe fails or is disabled
createCqlSchema() - now drops/creates the schema
if data wipe fails or is disabled.
runCqlScript(() - added request-timeout to prevent
timeout errors in slow environments
wipeCqlData(bool show_err) - new function that
attempts to run the wipe shell script
src/lib/dhcpsrv/tests/cql_lease_mgr_unittest.cc
Removed now superflous destroyCqlSchema calls
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