]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1574] reformulate some error messages
authorAndrei Pavel <andrei@isc.org>
Fri, 11 Dec 2020 15:19:12 +0000 (17:19 +0200)
committerAndrei Pavel <andrei@isc.org>
Mon, 14 Dec 2020 10:08:39 +0000 (12:08 +0200)
src/bin/admin/tests/cql_tests.sh.in
src/bin/admin/tests/mysql_tests.sh.in
src/bin/admin/tests/pgsql_tests.sh.in

index 0ede814595bd3f086460ffd3d05cd0030725e38d..bdf4113c3fd43ede10f4d8903bff7cc5b7bb8fa2 100644 (file)
@@ -33,7 +33,7 @@ cql_wipe() {
     # Wipe the database.
     run_command \
         cql_execute_script $db_scripts_dir/cql/dhcpdb_drop.cql
-    assert_eq 0 "${EXIT_CODE}" "drop table query failed, exit code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "drop table query failed, expected %d, returned %d"
 }
 
 cql_db_init_test() {
index f3e26029f550b8b69fe8259b1280b85f472b10b2..cd260838c76dc555510c567f09af0e900016faf9 100644 (file)
@@ -69,7 +69,7 @@ mysql_wipe() {
     run_command \
         mysql_execute_script "${db_scripts_dir}/mysql/dhcpdb_drop.mysql"
 
-    assert_eq 0 "${EXIT_CODE}" "mysql-wipe: drop table sql failed, exit code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "mysql-wipe: drop table sql failed, epected %d, returned %d"
 }
 
 mysql_db_init_test() {
@@ -82,7 +82,7 @@ mysql_db_init_test() {
     run_command \
         "${kea_admin}" db-init mysql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}"
 
-    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init mysql returned non-zero status code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init mysql failed, expected %d, returned non-zero status code %d"
 
     # Ok, now let's check if the tables are indeed there.
     # First table: schema_version. Should have 2 columns: version and minor.
@@ -163,7 +163,7 @@ mysql_host_reservation_init_test() {
     # Ok, now let's initialize the database
     run_command \
         "${kea_admin}" db-init mysql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}"
-    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init mysql returned non-zero status code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init mysql failed, expected %d, returned non-zero status code %d"
 
     # Ok, now let's check if the tables are indeed there.
     # First table: schema_version. Should have 2 columns: version and minor.
@@ -264,7 +264,7 @@ mysql_upgrade_test() {
     # Ok, we have a 1.0 database. Let's upgrade it to 9.5
     run_command \
         "${kea_admin}" db-upgrade mysql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}"
-    assert_eq 0 "${EXIT_CODE}" "kea-admin db-upgrade mysql returned non-zero status code %d, expected %d\n"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin db-upgrade mysql failed, expected %d, returned non-zero status code %d\n"
 
     # Let's check that the new tables are indeed there.
 
@@ -950,7 +950,7 @@ mysql_lease4_stat_test() {
     # Ok, now let's initialize the database
     run_command \
         "${kea_admin}" db-init mysql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}"
-    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init mysql returned non-zero status code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init mysql failed, expected %d, returned non-zero status code %d"
 
     # Verify lease4 stat table is present
     qry="select count(subnet_id) from lease4_stat";
@@ -1042,7 +1042,7 @@ mysql_lease6_stat_test() {
     # Ok, now let's initialize the database
     run_command \
         "${kea_admin}" db-init mysql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}"
-    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init mysql returned non-zero status code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init mysql failed, expected %d, returned non-zero status code %d"
 
     # verify lease6 stat table is present
     qry="select count(subnet_id) from lease6_stat"
@@ -1216,7 +1216,7 @@ mysql_lease_stat_recount_test() {
     # Ok, now let's initialize the database
     run_command \
         "${kea_admin}" db-init mysql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}"
-    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init mysql returned non-zero status code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init mysql failed, expected %d, returned non-zero status code %d"
 
     # Now we need insert some leases to "recount"
     qry=\
@@ -1252,7 +1252,7 @@ mysql_lease_stat_recount_test() {
     # Recount all statistics from scratch.
     run_command \
         "${kea_admin}" stats-recount mysql -u "${db_user}" -p "${db_password}" -n "${db_name}"
-    assert_eq 0 "${EXIT_CODE}" "kea-admin stats-recount mysql returned non-zero status code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin stats-recount mysql failed, expected %d, returned non-zero status code %d"
 
     #
     # First we'll verify lease4_stats are correct after recount.
index 14d15d29b1550d6982b1a43d03eea1dccc19ccc4..090a601c9ea570c1d2d9f6c0226355677b2c6d4f 100644 (file)
@@ -580,7 +580,7 @@ pgsql_lease4_stat_test() {
     # Ok, now let's initialize the database
     run_command \
         "${kea_admin}" db-init pgsql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}"
-    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init pgsql returned non-zero status code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init pgsql failed, expected %d, returned non-zero status code %d"
 
     # Verify lease4 stat table is present
     qry="select count(subnet_id) from lease4_stat"
@@ -672,7 +672,7 @@ pgsql_lease6_stat_test() {
     # Ok, now let's initialize the database
     run_command \
         "${kea_admin}" db-init pgsql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}"
-    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init pgsql returned non-zero status code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init pgsql failed, expected %d, returned non-zero status code %d"
 
     # verify lease6 stat table is present
     qry="select count(subnet_id) from lease6_stat"
@@ -846,7 +846,7 @@ pgsql_lease_stat_recount_test() {
     run_command \
         "${kea_admin}" db-init pgsql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}"
 
-    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init pgsql returned non-zero status code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin db-init pgsql failed, expected %d, returned non-zero status code %d"
 
     # Now we need insert some leases to "recount"
     qry=\
@@ -883,7 +883,7 @@ pgsql_lease_stat_recount_test() {
     run_command \
         "${kea_admin}" stats-recount pgsql -u "${db_user}" -p "${db_password}" -n "${db_name}"
 
-    assert_eq 0 "${EXIT_CODE}" "kea-admin stats-recount pgsql returned non-zero status code %d, expected %d"
+    assert_eq 0 "${EXIT_CODE}" "kea-admin stats-recount pgsql failed, expected %d, returned non-zero status code %d"
 
     #
     # First we'll verify lease4_stats are correct after recount.