3021: Refactor run_test_server.
authorTom Clegg <tom@curoverse.com>
Mon, 2 Feb 2015 00:48:09 +0000 (19:48 -0500)
committerTom Clegg <tom@curoverse.com>
Mon, 2 Feb 2015 05:29:01 +0000 (00:29 -0500)
commit13181107ecaeaa92e5d96b05270e56b2d807af39
tree214577e23285fc6dd85d459fece2daa84503690e
parent48580ba7a6608c89e91afad4b73f2861aafbd7b2
3021: Refactor run_test_server.

* Always start API server with both https:// and wss:// enabled. Use
  mocks to test the websocket-not-available case.

* Leave the API server running between tests; just hit reset() when
  needed. Wait until exiting the process to stop the server.

* Do not use rake (tmp:cache:clear, db:test:load, db:fixtures:load) to
  reset the API server's database before starting up a new
  server. Instead, call /database/reset after starting it. (If that
  doesn't work, crash instead of proceeding with undefined results.)

* If a parent process has already started an API server and put its
  endpoint in ARVADOS_TEST_API_HOST, use that instead of starting a
  new one, and leave it running at exit.

* Start servers on random port numbers, so [some] test suites can run
  concurrently with others on a single host (assuming they're
  configured to use different databases).
.gitignore
sdk/python/tests/run_test_server.py
sdk/python/tests/test_api.py
sdk/python/tests/test_keep_client.py
sdk/python/tests/test_pipeline_template.py
sdk/python/tests/test_websockets.py
services/api/config/application.default.yml
services/fuse/tests/test_mount.py