Fix failing test with mysql 5.7

It turns out that buildkite CI was running with mysql 8 and that means
we weren't testing the behavior of mysql 5.7. This fixes a failing test
in main due to the difference in error message.
This commit is contained in:
eileencodes 2022-07-13 12:11:20 -04:00
parent 05ae3faaf3
commit fde43b558a
No known key found for this signature in database
GPG Key ID: BA5C575120BBE8DF
1 changed files with 2 additions and 0 deletions

View File

@ -716,6 +716,8 @@ if ActiveRecord::Base.connection.supports_foreign_keys?
assert_match(/Duplicate key on write or update/, error.message)
elsif ActiveRecord::Base.connection.database_version < "5.6"
assert_match(/Can't create table/, error.message)
elsif ActiveRecord::Base.connection.database_version < "8.0"
assert_match(/Can't write\; duplicate key in table/, error.message)
else
assert_match(/Duplicate foreign key constraint name/, error.message)
end