Skip to content

Commit

Permalink
Silence migrations running during test
Browse files Browse the repository at this point in the history
  • Loading branch information
julik committed Nov 2, 2023
1 parent 06421be commit 7866aaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/leaky_bucket_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
class LeakyBucketTest < ActiveSupport::TestCase
setup do
seed_db_name = Random.new(Minitest.seed).hex(4)
ActiveRecord::Migration.verbose = false
ActiveRecord::Base.establish_connection(adapter: 'postgresql', database: 'postgres')
ActiveRecord::Base.connection.create_database('pecorino_tests_%s' % seed_db_name, charset: :unicode)
ActiveRecord::Base.connection.close
Expand Down
1 change: 1 addition & 0 deletions test/throttle_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def random_leaky_bucket_name(random: Random.new)

setup do
seed_db_name = Random.new(Minitest.seed).hex(4)
ActiveRecord::Migration.verbose = false
ActiveRecord::Base.establish_connection(adapter: 'postgresql', database: 'postgres')
ActiveRecord::Base.connection.create_database('pecorino_tests_%s' % seed_db_name, charset: :unicode)
ActiveRecord::Base.connection.close
Expand Down

0 comments on commit 7866aaa

Please sign in to comment.