diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t index 6679bd5567..4b7d0ce913 100755 --- a/t/db_dependent/Koha/Object.t +++ b/t/db_dependent/Koha/Object.t @@ -647,10 +647,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;