]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1920] Extended MySQL shell test
authorMarcin Siodelski <marcin@isc.org>
Fri, 2 Jul 2021 17:19:31 +0000 (19:19 +0200)
committerMarcin Siodelski <marcin@isc.org>
Mon, 5 Jul 2021 09:24:38 +0000 (09:24 +0000)
Besides checking that the two classes get swapped check that the first
class remains at the same position.

src/bin/admin/tests/mysql_tests.sh.in

index 9910cbb70e0958c3118079d107287ef3894226b8..7f33975ff92e98bf2440d8505437e5f4ab36f3d5 100644 (file)
@@ -1668,6 +1668,12 @@ mysql_client_class_test() {
              ON c.id = o.class_id WHERE c.name = 'foobar'";
     run_statement "#get order index of class foobar" "$sql" 3
 
+    # Check that the first class is still at the first position.
+    sql="SELECT o.order_index FROM ${table_prefix}_client_class AS c \
+         INNER JOIN ${table_prefix}_client_class_order AS o \
+             ON c.id = o.class_id WHERE c.name = 'foo'";
+    run_statement "#get order index of class foo" "$sql" 1
+
     # Let's wipe the whole database
     mysql_wipe