ad88e3f88d
The default behavior of seed_fu is to load the fixtures using the RAILS_ENV environment. In CI, since we set RAILS_ENV=test, nothing is ever loaded. Instead of `rake db:seed_fu`, use `rake gitlab:setup`, which sets up MySQL properly with limits. Closes #41517
26 lines
356 B
Ruby
26 lines
356 B
Ruby
# :nocov:
|
|
module DeliverNever
|
|
def deliver_later
|
|
self
|
|
end
|
|
end
|
|
|
|
module Gitlab
|
|
class Seeder
|
|
def self.quiet
|
|
mute_mailer
|
|
|
|
SeedFu.quiet = true
|
|
|
|
yield
|
|
|
|
SeedFu.quiet = false
|
|
puts "\nOK".color(:green)
|
|
end
|
|
|
|
def self.mute_mailer
|
|
ActionMailer::MessageDelivery.prepend(DeliverNever)
|
|
end
|
|
end
|
|
end
|
|
# :nocov:
|