diff options
author | Francis Dupont <fdupont@isc.org> | 2024-01-12 16:10:49 +0100 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2024-01-17 09:48:36 +0100 |
commit | acb7102937e2f8a4d6a37f50a84871e5894018ff (patch) | |
tree | 535cbf25ceef54c81fb46b5746da60f48aba353d /src/bin | |
parent | [#3149] Added a new index (diff) | |
download | kea-acb7102937e2f8a4d6a37f50a84871e5894018ff.tar.xz kea-acb7102937e2f8a4d6a37f50a84871e5894018ff.zip |
[#3149] Moved admin tests to last versions
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/admin/tests/mysql_tests.sh.in | 17 | ||||
-rw-r--r-- | src/bin/admin/tests/pgsql_tests.sh.in | 16 |
2 files changed, 26 insertions, 7 deletions
diff --git a/src/bin/admin/tests/mysql_tests.sh.in b/src/bin/admin/tests/mysql_tests.sh.in index 4f4d42f8da..be8b9a3754 100644 --- a/src/bin/admin/tests/mysql_tests.sh.in +++ b/src/bin/admin/tests/mysql_tests.sh.in @@ -822,6 +822,14 @@ mysql_upgrade_19_to_20_test() { assert_str_eq "20.0" "${version}" "Expected kea-admin to return %s, returned value was %s" } +mysql_upgrade_20_to_21_test() { + # The function, mysql_ddns_conflict_resolution_mode_update_test, is called explicitly + # and tests conversion of ddns-use-conflict-resolution to ddns-conflict-resolution-mode. + # For now this function only verifies version number. + version=$("${kea_admin}" db-version mysql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}") + assert_str_eq "21.0" "${version}" "Expected kea-admin to return %s, returned value was %s" +} + mysql_upgrade_test() { test_start "mysql.upgrade" @@ -843,7 +851,7 @@ mysql_upgrade_test() { # Verify that the upgraded schema reports the latest version. version=$("${kea_admin}" db-version mysql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}") - assert_str_eq "20.0" "${version}" "Expected kea-admin to return %s, returned value was %s" + assert_str_eq "21.0" "${version}" "Expected kea-admin to return %s, returned value was %s" # Let's check that the new tables are indeed there. @@ -1509,6 +1517,9 @@ SET @disable_audit = 0" # Check upgrade from 19.0 to 20.0. mysql_upgrade_19_to_20_test + # Check upgrade from 20.0 to 21.0. + mysql_upgrade_20_to_21_test + # Let's wipe the whole database mysql_wipe @@ -2913,8 +2924,8 @@ mysql_ddns_conflict_resolution_mode_update_test() { qry="select count(*) from dhcp6_global_parameter where name='ddns-use-conflict-resolution';" run_statement "#get 6_global parameter count before update" "$qry" 2 - # Upgrade to schema 20.0 - mysql_upgrade_schema_to_version 20.0 + # Upgrade to schema 21.0 + mysql_upgrade_schema_to_version 21.0 # Verify we converted parameters correctly. qry="select count(*) from dhcp4_global_parameter where name='ddns-conflict-resolution-mode' and\ diff --git a/src/bin/admin/tests/pgsql_tests.sh.in b/src/bin/admin/tests/pgsql_tests.sh.in index 32d37e6ba7..738cec5e87 100644 --- a/src/bin/admin/tests/pgsql_tests.sh.in +++ b/src/bin/admin/tests/pgsql_tests.sh.in @@ -143,7 +143,7 @@ pgsql_db_version_test() { run_command \ "${kea_admin}" db-version pgsql -u "${db_user}" -p "${db_password}" -n "${db_name}" version="${OUTPUT}" - assert_str_eq "19.0" "${version}" "Expected kea-admin to return %s, returned value was %s" + assert_str_eq "20.0" "${version}" "Expected kea-admin to return %s, returned value was %s" # Let's wipe the whole database pgsql_wipe @@ -891,6 +891,11 @@ pgsql_upgrade_18_to_19_test() { run_statement "lease6_remote_id_get" "$qry" "3001::99" } +pgsql_upgrade_19_to_20_test() { + # For now this function only verifies version number. + version=$("${kea_admin}" db-version pgsql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}") + assert_str_eq "20.0" "${version}" 'Expected kea-admin to return %s, returned value was %s' +} pgsql_upgrade_test() { test_start "pgsql.upgrade" @@ -909,7 +914,7 @@ pgsql_upgrade_test() { # Verify upgraded schema reports the latest version. version=$("${kea_admin}" db-version pgsql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}") - assert_str_eq "19.0" "${version}" 'Expected kea-admin to return %s, returned value was %s' + assert_str_eq "20.0" "${version}" 'Expected kea-admin to return %s, returned value was %s' # Check 1.0 to 2.0 upgrade pgsql_upgrade_1_0_to_2_0_test @@ -962,6 +967,9 @@ pgsql_upgrade_test() { # Check 18 to 19 upgrade pgsql_upgrade_18_to_19_test + # Check 19 to 20 upgrade + pgsql_upgrade_19_to_20_test + # Let's wipe the whole database pgsql_wipe @@ -2114,8 +2122,8 @@ pgsql_ddns_conflict_resolution_mode_update_test() { qry="select count(*) from dhcp6_global_parameter where name='ddns-use-conflict-resolution';" run_statement "#get 6_global parameter count before update" "$qry" 2 - # Upgrade to schema 19.0 - pgsql_upgrade_schema_to_version 19.0 + # Upgrade to schema 20.0 + pgsql_upgrade_schema_to_version 20.0 # Verify we converted parameters correctly. qry="select count(*) from dhcp4_global_parameter where name='ddns-conflict-resolution-mode' and\ |