3 class JobsApiTest < ActionDispatch::IntegrationTest
7 post "/arvados/v1/jobs/#{jobs(:running).uuid}/cancel", {:format => :json}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:active).api_token}"}
8 assert_response :success
9 assert_equal "arvados#job", json_response['kind']
10 assert_not_nil json_response['cancelled_at']
13 test "cancel someone else's visible job" do
14 post "/arvados/v1/jobs/#{jobs(:runningbarbaz).uuid}/cancel", {:format => :json}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:spectator).api_token}"}
18 test "cancel someone else's invisible job" do
19 post "/arvados/v1/jobs/#{jobs(:running).uuid}/cancel", {:format => :json}, {'HTTP_AUTHORIZATION' => "OAuth2 #{api_client_authorizations(:spectator).api_token}"}
23 test "task qsequence values automatically increase monotonically" do
24 post_args = ["/arvados/v1/job_tasks",
26 job_uuid: jobs(:running).uuid,
31 (1..3).each do |task_num|
34 assert_response :success
35 qsequence = json_response["qsequence"]
36 assert_not_nil(qsequence, "task not assigned qsequence")
37 assert_operator(qsequence, :>, last_qsequence,
38 "qsequence did not increase between tasks")
39 last_qsequence = qsequence