From: Marcin Siodelski Date: Fri, 2 Jul 2021 17:19:31 +0000 (+0200) Subject: [#1920] Extended MySQL shell test X-Git-Tag: Kea-1.9.10~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b606998d2dc5cc043fa7e1172b7a495cdfcdae8e;p=thirdparty%2Fkea.git [#1920] Extended MySQL shell test Besides checking that the two classes get swapped check that the first class remains at the same position. --- diff --git a/src/bin/admin/tests/mysql_tests.sh.in b/src/bin/admin/tests/mysql_tests.sh.in index 9910cbb70e..7f33975ff9 100644 --- a/src/bin/admin/tests/mysql_tests.sh.in +++ b/src/bin/admin/tests/mysql_tests.sh.in @@ -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