16602: Test for applying WorkflowRunnerResource
authorPeter Amstutz <peter.amstutz@curii.com>
Fri, 28 Aug 2020 01:38:34 +0000 (21:38 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Fri, 28 Aug 2020 20:05:18 +0000 (16:05 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

apps/workbench/test/integration/work_units_test.rb
services/api/test/fixtures/workflows.yml

index 9d4f5905553d96f9fbc3500009dad5d11bdd49b7..43740f192d641772e3515a9ddc2ed92d68b3f5ff 100644 (file)
@@ -283,4 +283,23 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest
     assert_text "This container request was created from the workflow"
     assert_match /Provide a value for .* then click the \"Run\" button to start the workflow/, page.text
   end
+
+  test "create workflow with WorkflowRunnerResources" do
+    visit page_with_token('active', '/workflows/zzzzz-7fd4e-validwithinput3')
+
+    find('a,button', text: 'Run this workflow').click
+
+    # Choose project for the container_request being created
+    within('.modal-dialog') do
+      find('.selectable', text: 'A Project').click
+      find('button', text: 'Choose').click
+    end
+    click_link 'Advanced'
+    click_link("API response")
+    assert_text('"container_image": "arvados/jobs:2.0.4"')
+    assert_text('"vcpus": 2')
+    assert_text('"ram": 1293942784')
+    assert_text('"--collection-cache-size=678"')
+
+  end
 end
index 2859e375a4949ff53e8f53b3458bc4e4fb02ad0a..98bfeaf842bbd456bbaa1f282a1ec3a2da9cc197 100644 (file)
@@ -67,3 +67,28 @@ workflow_with_input_defaults:
       id: ex_string_def
       default: hello-testing-123
     outputs: []
+
+workflow_with_wrr:
+  uuid: zzzzz-7fd4e-validwithinput3
+  owner_uuid: zzzzz-j7d0g-zhxawtyetzwc5f0
+  name: Workflow with default input specifications
+  description: this workflow has inputs specified
+  created_at: <%= 1.minute.ago.to_s(:db) %>
+  definition: |
+    cwlVersion: v1.0
+    class: CommandLineTool
+    hints:
+      - class: http://arvados.org/cwl#WorkflowRunnerResources
+        acrContainerImage: arvados/jobs:2.0.4
+        ramMin: 1234
+        coresMin: 2
+        keep_cache: 678
+    baseCommand:
+    - echo
+    inputs:
+    - type: string
+      id: ex_string
+    - type: string
+      id: ex_string_def
+      default: hello-testing-123
+    outputs: []