mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 14:05:33 +00:00
[#1387] Fixed admin tests
This commit is contained in:
@@ -864,7 +864,7 @@ mysql_upgrade_test() {
|
|||||||
|
|
||||||
# Verify that the upgraded schema reports the latest version.
|
# 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}")
|
version=$("${kea_admin}" db-version mysql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}")
|
||||||
assert_str_eq "24.0" "${version}" "Expected kea-admin to return %s, returned value was %s"
|
assert_str_eq "25.0" "${version}" "Expected kea-admin to return %s, returned value was %s"
|
||||||
|
|
||||||
# Let's check that the new tables are indeed there.
|
# Let's check that the new tables are indeed there.
|
||||||
|
|
||||||
@@ -3375,8 +3375,8 @@ mysql_migrate_opt_record_type() {
|
|||||||
qry="select count(*) from dhcp6_option_def;"
|
qry="select count(*) from dhcp6_option_def;"
|
||||||
run_statement "#get 6_option_def_count before update" "$qry" 3
|
run_statement "#get 6_option_def_count before update" "$qry" 3
|
||||||
|
|
||||||
# Upgrade to schema 24.0
|
# Upgrade to schema 25.0
|
||||||
mysql_upgrade_schema_to_version 24.0
|
mysql_upgrade_schema_to_version 25.0
|
||||||
|
|
||||||
# Verify the migrated records.
|
# Verify the migrated records.
|
||||||
qry="select type from dhcp4_option_def where name = 'foo';"
|
qry="select type from dhcp4_option_def where name = 'foo';"
|
||||||
@@ -3438,8 +3438,8 @@ mysql_remove_control_socket_parameters_test() {
|
|||||||
qry="select count(*) from dhcp6_global_parameter where name like '%control-socket%';"
|
qry="select count(*) from dhcp6_global_parameter where name like '%control-socket%';"
|
||||||
run_statement "#get 6_global parameter count before update" "$qry" 2
|
run_statement "#get 6_global parameter count before update" "$qry" 2
|
||||||
|
|
||||||
# Upgrade to schema 24.0
|
# Upgrade to schema 25.0
|
||||||
mysql_upgrade_schema_to_version 24.0
|
mysql_upgrade_schema_to_version 25.0
|
||||||
|
|
||||||
# Verify the record have been removed.
|
# Verify the record have been removed.
|
||||||
qry="select count(*) from dhcp4_global_parameter where name like '%control-socket%';"
|
qry="select count(*) from dhcp4_global_parameter where name like '%control-socket%';"
|
||||||
|
@@ -142,7 +142,7 @@ pgsql_db_version_test() {
|
|||||||
run_command \
|
run_command \
|
||||||
"${kea_admin}" db-version pgsql -u "${db_user}" -p "${db_password}" -n "${db_name}"
|
"${kea_admin}" db-version pgsql -u "${db_user}" -p "${db_password}" -n "${db_name}"
|
||||||
version="${OUTPUT}"
|
version="${OUTPUT}"
|
||||||
assert_str_eq "24.0" "${version}" "Expected kea-admin to return %s, returned value was %s"
|
assert_str_eq "25.0" "${version}" "Expected kea-admin to return %s, returned value was %s"
|
||||||
|
|
||||||
# Let's wipe the whole database
|
# Let's wipe the whole database
|
||||||
pgsql_wipe
|
pgsql_wipe
|
||||||
@@ -954,7 +954,7 @@ pgsql_upgrade_test() {
|
|||||||
|
|
||||||
# Verify upgraded schema reports the latest version.
|
# 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}")
|
version=$("${kea_admin}" db-version pgsql -u "${db_user}" -p "${db_password}" -n "${db_name}" -d "${db_scripts_dir}")
|
||||||
assert_str_eq "24.0" "${version}" 'Expected kea-admin to return %s, returned value was %s'
|
assert_str_eq "25.0" "${version}" 'Expected kea-admin to return %s, returned value was %s'
|
||||||
|
|
||||||
# Check 1.0 to 2.0 upgrade
|
# Check 1.0 to 2.0 upgrade
|
||||||
pgsql_upgrade_1_0_to_2_0_test
|
pgsql_upgrade_1_0_to_2_0_test
|
||||||
|
Reference in New Issue
Block a user