2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 06:25:34 +00:00

[#526,!269] Addressed more review comments

src/lib/cql/testutils/cql_schema.*
    Modified to use common softWipeEnabled(), which
    defaults to true

src/lib/database/testutils/schema.*
    bool softWipeEnabled() - new function that checks
    env varible to determine if DB data wiping is enabled
    (default is true/enabled)

src/lib/mysql/testutils/mysql_schema.*
    createMySQLSchema()
    destroyMySQLSchema()-  now softWipeEnabled() to allow
    data wiping to be turned on/off

src/share/database/scripts/mysql/wipe_data.sh.in
    Added better error messaging

several files:
    Removed extraneous calls to destroyMySQLSchema, added
    comments
This commit is contained in:
Thomas Markwalder
2019-03-11 13:50:00 -04:00
parent 6af5e78ec8
commit 9bc1a0edf9
19 changed files with 57 additions and 54 deletions

View File

@@ -8,3 +8,4 @@
/upgrade_5.2_to_6.0.sh
/upgrade_6.0_to_7.0.sh
/upgrade_7.0_to_8.0.sh
/wipe_data.sh

View File

@@ -28,8 +28,13 @@ shift;
# If the existing schema doesn't match, the fail
VERSION=`mysql_version "$@"`
if [ "$VERSION" = "" ]; then
printf "Cannot wipe data, schema version could not be detected.\n"
exit 1
fi
if [ "$VERSION" != "$exp_version" ]; then
printf "Reported version is $VERSION is wrong, expected $exp_version.\n"
printf "Cannot wipe data, wrong schema version. Expected $exp_version, found version $VERSION.\n"
exit 1
fi