]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#845] Fixes in kea-admin/mysql.upgrade unit-test
authorTomek Mrugalski <tomasz@isc.org>
Tue, 20 Aug 2019 10:41:59 +0000 (12:41 +0200)
committerMarcin Siodelski <marcin@isc.org>
Tue, 20 Aug 2019 11:56:08 +0000 (07:56 -0400)
src/bin/admin/tests/mysql_tests.sh.in

index d0ae3ec1e6796d96e042ad312f547d9503b1a480..b8566d66ec216ddbf062358c7c852a00c88f8c64 100644 (file)
@@ -624,7 +624,7 @@ EOF
     # First set the cascade_transaction session variable to check that
     # the procedure won't create the audit entry for the option when
     # this flag is set.
-    qry="SET @audit_revision_id = (SELECT id FROM dhcp4_audit_revision LIMIT 1); SET @cascade_transaction = 1; CALL createOptionAuditDHCP4('create', 0, 1024, NULL, NULL, NULL, NULL)"
+    qry="SET @audit_revision_id = (SELECT id FROM dhcp4_audit_revision LIMIT 1); SET @cascade_transaction = 1; CALL createOptionAuditDHCP4('create', 0, 1024, NULL, NULL, NULL, NULL, now())"
     run_statement "createOptionAuditDHCP4 cascade update" "$qry"
 
     # The number of rows matching the audit entry should be 0.
@@ -633,7 +633,7 @@ EOF
 
     # This time set the cascade_update to 0 and expect that the
     # audit entry will be created for the option.
-    qry="SET @audit_revision_id = (SELECT id FROM dhcp4_audit_revision LIMIT 1); SET @cascade_transaction = 0; CALL createOptionAuditDHCP4('create', 0, 1024, NULL, NULL, NULL, NULL)"
+    qry="SET @audit_revision_id = (SELECT id FROM dhcp4_audit_revision LIMIT 1); SET @cascade_transaction = 0; CALL createOptionAuditDHCP4('create', 0, 1024, NULL, NULL, NULL, NULL, now())"
     run_statement "createOptionAuditDHCP4 cascade update" "$qry"
 
     qry="SELECT COUNT(*) FROM dhcp4_audit WHERE object_type = 'dhcp4_options' AND object_id = 1024";
@@ -667,7 +667,7 @@ EOF
     # First set the cascade_transaction session variable to check that
     # the procedure won't create the audit entry for the option when
     # this flag is set.
-    qry="SET @audit_revision_id = (SELECT id FROM dhcp6_audit_revision LIMIT 1); SET @cascade_transaction = 1; CALL createOptionAuditDHCP6('create', 0, 1024, NULL, NULL, NULL, NULL, NULL)"
+    qry="SET @audit_revision_id = (SELECT id FROM dhcp6_audit_revision LIMIT 1); SET @cascade_transaction = 1; CALL createOptionAuditDHCP6('create', 0, 1024, NULL, NULL, NULL, NULL, NULL, now())"
     run_statement "createOptionAuditDHCP6 cascade update" "$qry"
 
     # The number of rows matching the audit entry should be 0.
@@ -676,7 +676,7 @@ EOF
 
     # This time set the cascade_update to 0 and expect that the
     # audit entry will be created for the option.
-    qry="SET @audit_revision_id = (SELECT id FROM dhcp6_audit_revision LIMIT 1); SET @cascade_transaction = 0; CALL createOptionAuditDHCP6('create', 0, 1024, NULL, NULL, NULL, NULL, NULL)"
+    qry="SET @audit_revision_id = (SELECT id FROM dhcp6_audit_revision LIMIT 1); SET @cascade_transaction = 0; CALL createOptionAuditDHCP6('create', 0, 1024, NULL, NULL, NULL, NULL, NULL,now())"
     run_statement "createOptionAuditDHCP6 cascade update" "$qry"
 
     qry="SELECT COUNT(*) FROM dhcp6_audit WHERE object_type = 'dhcp6_options' AND object_id = 1024";
@@ -1118,6 +1118,8 @@ mysql_lease_stat_upgrade_test() {
 
     # Let's wipe the whole database
     mysql_wipe
+
+    test_finish 0
 }
 
 # Verifies that you can upgrade from an earlier version and
@@ -1201,6 +1203,8 @@ mysql_unused_subnet_id_test() {
 
     # Let's wipe the whole database
     mysql_wipe
+
+    test_finish 0
 }
 
 mysql_db_init_test