Initial commit
This commit is contained in:
15
lib/tasks/test_seed.rake
Normal file
15
lib/tasks/test_seed.rake
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace :test do
|
||||
desc 'Seed test users (Barong + Peatio balances) for local/test environments'
|
||||
task seed: :environment do
|
||||
if ENV.fetch('FIBITEX_SEED_TEST_USERS', 'true') == 'false'
|
||||
puts 'SKIP test:seed (FIBITEX_SEED_TEST_USERS=false)'
|
||||
next
|
||||
end
|
||||
|
||||
puts '----- Seeding test users (Barong) -----'
|
||||
sh 'docker-compose run --rm barong bash -c "bundle exec rails runner ./lib/seed_test_users.rb"'
|
||||
|
||||
puts '----- Seeding test balances (Peatio) -----'
|
||||
sh 'docker-compose run --rm peatio bash -c "ruby ./bin/link_config && bundle exec rails runner ./lib/seed_test_balances.rb"'
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user