aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorJ Smith <dark.panda@gmail.com>2018-09-17 12:13:42 -0300
committerJ Smith <dark.panda@gmail.com>2018-09-17 12:13:42 -0300
commit69e0e0acf9a286a41f1adaae8e3e04b3a34101a1 (patch)
tree688de14fa12a84c8b9372e9e67873104710ac9cc /activejob
parent11581afc01927565d57dd0e0156e983f92f8c2e0 (diff)
downloadrails-69e0e0acf9a286a41f1adaae8e3e04b3a34101a1.tar.gz
rails-69e0e0acf9a286a41f1adaae8e3e04b3a34101a1.tar.bz2
rails-69e0e0acf9a286a41f1adaae8e3e04b3a34101a1.zip
Ignore psqlrc files when executing psql commands
psqlrc files can affect the execution of commands in ways that can hold up execution by blocking or otherwise cause unexpected side effects and should best be ignored when using psql programmatically.
Diffstat (limited to 'activejob')
-rw-r--r--activejob/test/support/integration/adapters/que.rb4
-rw-r--r--activejob/test/support/integration/adapters/queue_classic.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/activejob/test/support/integration/adapters/que.rb b/activejob/test/support/integration/adapters/que.rb
index 2a771b08c7..2e7d327b37 100644
--- a/activejob/test/support/integration/adapters/que.rb
+++ b/activejob/test/support/integration/adapters/que.rb
@@ -18,8 +18,8 @@ module QueJobsManager
user = uri.user || ENV["USER"]
pass = uri.password
db = uri.path[1..-1]
- %x{#{"PGPASSWORD=\"#{pass}\"" if pass} psql -c 'drop database if exists "#{db}"' -U #{user} -t template1}
- %x{#{"PGPASSWORD=\"#{pass}\"" if pass} psql -c 'create database "#{db}"' -U #{user} -t template1}
+ %x{#{"PGPASSWORD=\"#{pass}\"" if pass} psql -X -c 'drop database if exists "#{db}"' -U #{user} -t template1}
+ %x{#{"PGPASSWORD=\"#{pass}\"" if pass} psql -X -c 'create database "#{db}"' -U #{user} -t template1}
Que.connection = Sequel.connect(que_url)
Que.migrate!
diff --git a/activejob/test/support/integration/adapters/queue_classic.rb b/activejob/test/support/integration/adapters/queue_classic.rb
index 1b0685a971..dbbdc12b9d 100644
--- a/activejob/test/support/integration/adapters/queue_classic.rb
+++ b/activejob/test/support/integration/adapters/queue_classic.rb
@@ -17,8 +17,8 @@ module QueueClassicJobsManager
user = uri.user || ENV["USER"]
pass = uri.password
db = uri.path[1..-1]
- %x{#{"PGPASSWORD=\"#{pass}\"" if pass} psql -c 'drop database if exists "#{db}"' -U #{user} -t template1}
- %x{#{"PGPASSWORD=\"#{pass}\"" if pass} psql -c 'create database "#{db}"' -U #{user} -t template1}
+ %x{#{"PGPASSWORD=\"#{pass}\"" if pass} psql -X -c 'drop database if exists "#{db}"' -U #{user} -t template1}
+ %x{#{"PGPASSWORD=\"#{pass}\"" if pass} psql -X -c 'create database "#{db}"' -U #{user} -t template1}
QC::Setup.create
QC.default_conn_adapter.disconnect