[ARVADOS] updated: 54e43ffa674583332713d980b5ba6701b4fa4d02
git at public.curoverse.com
git at public.curoverse.com
Fri Jun 13 10:45:48 EDT 2014
Summary of changes:
.../api/test/integration/crunch_dispatch_test.rb | 27 +++++++++++++++-------
1 file changed, 19 insertions(+), 8 deletions(-)
via 54e43ffa674583332713d980b5ba6701b4fa4d02 (commit)
from 0dffc025de9ebc7a54596e1018a589a6f5b8a03e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 54e43ffa674583332713d980b5ba6701b4fa4d02
Author: Tim Pierce <twp at curoverse.com>
Date: Fri Jun 13 10:44:21 2014 -0400
2934: add launch_crunch_dispatch to integration test
Added functionality for launching crunch-dispatch in
crunch_dispatch_test.rb while integration tests are running.
Refs #2934.
diff --git a/services/api/test/integration/crunch_dispatch_test.rb b/services/api/test/integration/crunch_dispatch_test.rb
index e968cf1..4abdcce 100644
--- a/services/api/test/integration/crunch_dispatch_test.rb
+++ b/services/api/test/integration/crunch_dispatch_test.rb
@@ -1,27 +1,38 @@
-require 'pp'
require 'test_helper'
load 'test/functional/arvados/v1/git_setup.rb'
class CrunchDispatchTest < ActionDispatch::IntegrationTest
- include CurrentApiClient
include GitSetup
fixtures :all
+ @@crunch_dispatch_pid = nil
+
+ def launch_crunch_dispatch
+ @@crunch_dispatch_pid = Process.fork {
+ ENV['PATH'] = ENV['HOME'] + '/arvados/services/crunch:' + ENV['PATH']
+ exec(ENV['HOME'] + '/arvados/services/api/script/crunch-dispatch.rb')
+ }
+ end
+
+ teardown do
+ if @@crunch_dispatch_pid
+ Process.kill "TERM", @@crunch_dispatch_pid
+ Process.wait
+ @@crunch_dispatch_pid = nil
+ end
+ end
+
test "job runs" do
- authorize_with :admin
- set_user_from_auth :admin
post "/arvados/v1/jobs", {
format: "json",
job: {
script: "log",
repository: "bar",
script_version: "143fec09e988160673c63457fa12a0f70b5b8a26",
- script_parameters: {}
+ script_parameters: "{}"
}
- }, {HTTP_AUTHORIZATION: "OAuth2 #{current_api_client_authorization}"}
- p "response: #{@response.body}"
+ }, auth(:admin)
assert_response :success
- resp = JSON.parse(@response.body)
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list