diff options
author | Arthur Nogueira Neves <github@arthurnn.com> | 2016-06-16 20:07:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-16 20:07:27 -0400 |
commit | 267489a103d4b99ca73dfa0d4b34c22c8fc6a803 (patch) | |
tree | 1dadc0a7a1a2fcdaf09110ee4817b070f15af6b0 /activerecord/test/cases | |
parent | 7291178265a98af7c443b0bfe6ebb34e0f157de8 (diff) | |
parent | 09a90bb6a06b1dafc9881651f585e8b40dda4227 (diff) | |
download | rails-267489a103d4b99ca73dfa0d4b34c22c8fc6a803.tar.gz rails-267489a103d4b99ca73dfa0d4b34c22c8fc6a803.tar.bz2 rails-267489a103d4b99ca73dfa0d4b34c22c8fc6a803.zip |
Merge pull request #24773 from ralinc/fix-silent-fail-on-psql-command
PostgreSQL: Fix db:structure:load silent failure on SQL error
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/tasks/postgresql_rake_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/tasks/postgresql_rake_test.rb b/activerecord/test/cases/tasks/postgresql_rake_test.rb index 6a0c7fbcb5..99d73e91a4 100644 --- a/activerecord/test/cases/tasks/postgresql_rake_test.rb +++ b/activerecord/test/cases/tasks/postgresql_rake_test.rb @@ -288,14 +288,14 @@ module ActiveRecord def test_structure_load filename = "awesome-file.sql" - Kernel.expects(:system).with('psql', '-q', '-f', filename, @configuration['database']).returns(true) + Kernel.expects(:system).with('psql', '-v', 'ON_ERROR_STOP=1', '-q', '-f', filename, @configuration['database']).returns(true) ActiveRecord::Tasks::DatabaseTasks.structure_load(@configuration, filename) end def test_structure_load_accepts_path_with_spaces filename = "awesome file.sql" - Kernel.expects(:system).with('psql', '-q', '-f', filename, @configuration['database']).returns(true) + Kernel.expects(:system).with('psql', '-v', 'ON_ERROR_STOP=1', '-q', '-f', filename, @configuration['database']).returns(true) ActiveRecord::Tasks::DatabaseTasks.structure_load(@configuration, filename) end |