mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Rescue spurious failures in case dummy postgresql user or schema already exists
This commit is contained in:
parent
17628ecfce
commit
cd498e2588
1 changed files with 2 additions and 2 deletions
|
@ -18,8 +18,8 @@ class SchemaAuthorizationTest < ActiveRecord::TestCase
|
|||
@connection.execute "SET search_path TO '$user',public"
|
||||
set_session_auth
|
||||
USERS.each do |u|
|
||||
@connection.execute "CREATE USER #{u}"
|
||||
@connection.execute "CREATE SCHEMA AUTHORIZATION #{u}"
|
||||
@connection.execute "CREATE USER #{u}" rescue nil
|
||||
@connection.execute "CREATE SCHEMA AUTHORIZATION #{u}" rescue nil
|
||||
set_session_auth u
|
||||
@connection.execute "CREATE TABLE #{TABLE_NAME} (#{COLUMNS.join(',')})"
|
||||
@connection.execute "INSERT INTO #{TABLE_NAME} (name) VALUES ('#{u}')"
|
||||
|
|
Loading…
Reference in a new issue