Merge branch '14988-wb-rails5-upgrade'
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 17 May 2019 17:31:29 +0000 (14:31 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 17 May 2019 17:31:29 +0000 (14:31 -0300)
Closes #14988

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

1  2 
build/run-tests.sh

diff --combined build/run-tests.sh
index 7886749b9a0893b45e943238773d506870b80f68,2807d3c3a39e6824cdce5f1a649efa60c9f867b0..0daf80f76742eb0f58e1dfb320f9b62841ed19b1
@@@ -380,20 -380,6 +380,20 @@@ checkpidfile() 
      echo "${svc} pid ${pid} ok"
  }
  
 +checkhealth() {
 +    svc="$1"
 +    port="$(cat "$WORKSPACE/tmp/${svc}.port")"
 +    scheme=http
 +    if [[ ${svc} =~ -ssl$ || ${svc} = wss ]]; then
 +        scheme=https
 +    fi
 +    url="$scheme://localhost:${port}/_health/ping"
 +    if ! curl -Ss -H "Authorization: Bearer e687950a23c3a9bceec28c6223a06c79" "${url}" | tee -a /dev/stderr | grep '"OK"'; then
 +        echo "${url} failed"
 +        return 1
 +    fi
 +}
 +
  checkdiscoverydoc() {
      dd="https://${1}/discovery/v1/apis/arvados/v1/rest"
      if ! (set -o pipefail; curl -fsk "$dd" | grep -q ^{ ); then
@@@ -427,15 -413,12 +427,15 @@@ start_services() 
          && checkdiscoverydoc $ARVADOS_API_HOST \
          && python sdk/python/tests/run_test_server.py start_controller \
          && checkpidfile controller \
 +        && checkhealth controller \
          && python sdk/python/tests/run_test_server.py start_keep_proxy \
          && checkpidfile keepproxy \
          && python sdk/python/tests/run_test_server.py start_keep-web \
          && checkpidfile keep-web \
 +        && checkhealth keep-web \
          && python sdk/python/tests/run_test_server.py start_arv-git-httpd \
          && checkpidfile arv-git-httpd \
 +        && checkhealth arv-git-httpd \
          && python sdk/python/tests/run_test_server.py start_ws \
          && checkpidfile ws \
          && eval $(python sdk/python/tests/run_test_server.py start_nginx) \
@@@ -1006,7 -989,6 +1006,7 @@@ gostuff=
      lib/cloud
      lib/cloud/azure
      lib/cloud/ec2
 +    lib/config
      lib/dispatchcloud
      lib/dispatchcloud/container
      lib/dispatchcloud/scheduler
@@@ -1106,17 -1088,17 +1106,17 @@@ test_services/nodemanager_integration(
  
  test_apps/workbench_units() {
      cd "$WORKSPACE/apps/workbench" \
-         && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test:units TESTOPTS=-v ${testargs[apps/workbench]} ${testargs[apps/workbench_units]}
+         && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test:units TESTOPTS='-v -d' ${testargs[apps/workbench]} ${testargs[apps/workbench_units]}
  }
  
  test_apps/workbench_functionals() {
      cd "$WORKSPACE/apps/workbench" \
-         && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test:functionals TESTOPTS=-v ${testargs[apps/workbench]} ${testargs[apps/workbench_functionals]}
+         && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test:functionals TESTOPTS='-v -d' ${testargs[apps/workbench]} ${testargs[apps/workbench_functionals]}
  }
  
  test_apps/workbench_integration() {
      cd "$WORKSPACE/apps/workbench" \
-         && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test:integration TESTOPTS=-v ${testargs[apps/workbench]} ${testargs[apps/workbench_integration]}
+         && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test:integration TESTOPTS='-v -d' ${testargs[apps/workbench]} ${testargs[apps/workbench_integration]}
  }
  
  test_apps/workbench_benchmark() {