diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t index bcdee8de31..3556f6ede4 100755 --- a/t/db_dependent/Koha/Object.t +++ b/t/db_dependent/Koha/Object.t @@ -293,10 +293,10 @@ subtest 'store() tests' => sub { 'Exception message is correct' ); - is( + like( $@->duplicate_id, - 'secret', - 'Exception field is correct' + qr/(api_keys\.)?secret/, + 'Exception field is correct (note that MySQL 8 is displaying the tablename)' ); $schema->storage->dbh->{PrintError} = $print_error;