Added support of RAILS_SERVE_STATIC_FILES.

This commit is contained in:
Martin Edenhofer 2015-11-24 13:36:13 +01:00
parent 62d4ead6a4
commit c67f6b2573

View file

@ -1,7 +1,7 @@
#!/bin/bash
while true; do
read -p "Do you wish to drop database ane execute all browser tests?" yn
read -p "Do you wish to drop the database and execute all browser tests?"
case $yn in
[Yy]* ) echo "Start tests..."; break;;
[Nn]* ) exit;;
@ -11,6 +11,7 @@ done
#export RAILS_ENV=test
export RAILS_ENV=production
export RAILS_SERVE_STATIC_FILES=true
bundle install
@ -40,7 +41,7 @@ rails r "Setting.set('developer_mode', true)"
pumactl --pidfile tmp/pids/puma.pid stop
script/websocket-server.rb stop
pumactl start --pidfile tmp/pids/puma.pid -d -p 4444 -e $RAILS_ENV
pumactl start --pidfile tmp/pids/puma.pid -d -p 4445 -e $RAILS_ENV
script/websocket-server.rb start -d
script/scheduler.rb start
@ -49,6 +50,7 @@ sleep 15
#export REMOTE_URL='http://medenhofer:765d0dd4-994b-4e15-9f89-13f3aedeb462@ondemand.saucelabs.com:80/wd/hub' BROWSER_OS='Windows 2012' BROWSER_VERSION=35 BROWSER=firefox
#export REMOTE_URL='http://192.168.178.32:4444/wd/hub'
#export REMOTE_URL='http://192.168.178.45:4444/wd/hub'
export REMOTE_URL='http://10.0.0.9:4444/wd/hub'
export RAILS_ENV=test
@ -59,9 +61,10 @@ time rake db:create
echo "rake db:migrate"
time rake db:migrate
rake test:browser["BROWSER_URL=http://localhost:4444"]
#rake test:browser["BROWSER_URL=http://localhost:4444 BROWSER=chrome"]
#rake test:browser["BROWSER_URL=http://192.168.178.28:4444"]
rake test:browser["BROWSER_URL=http://localhost:4445"]
#rake test:browser["BROWSER_URL=http://10.0.0.3:4445"]
#rake test:browser["BROWSER_URL=http://localhost:4445 BROWSER=chrome"]
#rake test:browser["BROWSER_URL=http://192.168.178.28:4445"]
script/scheduler.rb stop
script/websocket-server.rb stop