]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1319] Fixed version mess
authorFrancis Dupont <fdupont@isc.org>
Mon, 3 Aug 2020 09:17:50 +0000 (11:17 +0200)
committerFrancis Dupont <fdupont@isc.org>
Tue, 4 Aug 2020 08:28:51 +0000 (10:28 +0200)
src/bin/admin/tests/mysql_tests.sh.in

index e325f166c01fe097f56be7e9e7a351e091b58bf7..1c4f6388c6a983ac22cfa57dce246b8ddc3838e7 100644 (file)
@@ -1285,12 +1285,12 @@ mysql_unused_subnet_id_test() {
 
     run_statement "insert options" "$qry"
 
-    # Ok, we have a 4.0 database with hosts and options. Let's upgrade it to 5.0
-    ${keaadmin} db-upgrade mysql -u $db_user -p $db_password -n $db_name -d $db_scripts_dir
-    ERRCODE=$?
+    # Ok, we have a 6.0 database with hosts and options. Let's upgrade it to 7.0
+    mysql_upgrade_schema_to_version 7.0
 
-    # Upgrade should succeed
-    assert_eq 0 $ERRCODE "upgrade failed"
+    # Version should be new 7.0
+    version=$(${keaadmin} db-version mysql -u $db_user -p $db_password -n $db_name -d $db_scripts_dir)
+    assert_str_eq "7.0" ${version} "Expected kea-admin to return %s, returned value was %s"
 
     # Two hosts should have null v4 subnet ids
     qry="select count(host_id) from hosts where dhcp4_subnet_id is null;"