Updated robot setup

This commit is contained in:
Priit Tark 2015-02-27 14:08:13 +02:00
parent 527bc2a0dc
commit 1e38c0f7d7
3 changed files with 23 additions and 16 deletions

View file

@ -1,10 +0,0 @@
#!/bin/bash
#
# For docker
#
# cd to Rails root directory
cd "$(dirname "$0")"; cd ..
bin/update-repo
bin/robot

View file

@ -16,14 +16,12 @@ export RAILS_ENV=test
cd "$(dirname "$0")"; cd ..
cp config/application-example.yml config/application.yml
# create manually config/database.yml
cp config/database-robot.yml config/database.yml
bundle install
RAILS_ENV=test bundle exec rake db:drop
RAILS_ENV=test bundle exec rake db:all:create
RAILS_ENV=test bundle exec rake db:all:schema:load
RAILS_ENV=test bundle exec rake db:seed
RAILS_ENV=test bundle exec rake db:all:drop
RAILS_ENV=test bundle exec rake db:all:setup
RAILS_ENV=test bundle exec rake assets:precompile
echo "GIT_LAST_COMMITS"
@ -36,7 +34,7 @@ RCODE=$?
echo "END_OF_RUBOCOP_RESULTS"
echo "TEST_RESULTS"
ROBOT=true bundle exec rake test
ROBOT=true bundle exec rake
TCODE=$?
echo "END_OF_TEST_RESULTS"

19
config/database-robot.yml Normal file
View file

@ -0,0 +1,19 @@
default: &default
host: localhost
adapter: postgresql
encoding: unicode
pool: 5
username: test1
password: test
test:
<<: *default
database: registry_test
whois_test:
<<: *default
database: registry_whois_test
api_log_test:
<<: *default
database: registry_api_log_test