14198: Add more twostep tests
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Fri, 9 Nov 2018 20:02:50 +0000 (15:02 -0500)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Wed, 21 Nov 2018 18:05:26 +0000 (13:05 -0500)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

sdk/cwl/tests/federation/cases/twostep-home-to-remote.cwl
sdk/cwl/tests/federation/cases/twostep-remote-to-home.cwl
sdk/cwl/tests/federation/framework/prepare.py
sdk/cwl/tests/federation/main.cwl

index ffce6c3c472e95c7cbf256600b66ac3b65b4bfaa..6e8521b2b0465d6234310afada9e624f7ad4a2c9 100644 (file)
@@ -33,6 +33,3 @@ steps:
       runOnCluster: revCluster
     out: [revhash]
     run: rev.cwl
-    requirements:
-      arv:ClusterTarget:
-        cluster_id: $(inputs.runOnCluster)
index 4541ebba2187b1bb4bd26ec35aff0c9fcf47f4b5..7804b20244b779261635c3a893da2599651fe1ae 100644 (file)
@@ -14,7 +14,8 @@ inputs:
   inp:
     type: File
     inputBinding: {}
-  runOnCluster: string
+  md5sumCluster: string
+  revCluster: string
 outputs:
   hash:
     type: File
@@ -23,13 +24,12 @@ steps:
   md5sum:
     in:
       inp: inp
+      runOnCluster: md5sumCluster
     out: [hash]
     run: md5sum.cwl
-    requirements:
-      arv:ClusterTarget:
-        cluster_id: $(inputs.runOnCluster)
   rev:
     in:
       inp: md5sum/hash
+      runOnCluster: revCluster
     out: [revhash]
     run: rev.cwl
index 52c780a87da92954f01254e25ae9f0f82bfd282d..6fe90813e7a720c9ba5c11d9650af34e49ee9cdd 100644 (file)
@@ -36,7 +36,6 @@ for cluster_id in config["arvados_cluster_ids"]:
 for cluster_id in config["arvados_cluster_ids"]:
     matches = api.collections().list(filters=[["portable_data_hash", "in", list(scrub_collections)]],
                                      select=["uuid", "portable_data_hash"], cluster_id=cluster_id).execute()
-    print("matches from %s was %s" % (cluster_id, matches))
     for m in matches["items"]:
         api.collections().delete(uuid=m["uuid"]).execute()
         print("Scrubbed %s (%s)" % (m["uuid"], m["portable_data_hash"]))
index 346f979149334fef5b8a7b47376895ec5658553a..602cc2fcb70d4ecbc6e45879a585b6bc727412c9 100755 (executable)
@@ -42,6 +42,12 @@ outputs:
   twostep-home-to-remote-success:
     type: Any
     outputSource: twostep-home-to-remote/success
+  twostep-remote-to-home-success:
+    type: Any
+    outputSource: twostep-remote-to-home/success
+  twostep-both-remote:
+    type: Any
+    outputSource: twostep-both-remote/success
 
 steps:
   base-case:
@@ -183,4 +189,80 @@ steps:
     out: [out, success]
     run: framework/testcase.cwl
 
+  twostep-remote-to-home:
+    in:
+      arvados_api_token: arvados_api_token
+      arvado_api_host_insecure: arvado_api_host_insecure
+      arvados_api_hosts: arvados_api_hosts
+      arvados_cluster_ids: arvados_cluster_ids
+      acr: acr
+      wf:
+        default:
+          class: File
+          location: cases/twostep-remote-to-home.cwl
+          secondaryFiles:
+            - class: File
+              location: cases/md5sum.cwl
+            - class: File
+              location: cases/rev.cwl
+      obj:
+        default:
+          inp:
+            class: File
+            location: data/twostep-remote-to-home.txt
+        valueFrom: |-
+          ${
+          self["md5sumCluster"] = inputs.arvados_cluster_ids[1];
+          self["revCluster"] = inputs.arvados_cluster_ids[0];
+          return self;
+          }
+      runner_cluster: { valueFrom: "$(inputs.arvados_cluster_ids[0])" }
+      scrub_image: {default: "arvados/fed-test:twostep-remote-to-home"}
+      scrub_collections:
+        default:
+          - cce89b9f7b6e163978144051ce5f071a+74   # input collection
+          - 0c358c3af63644c6343766feff1b7238+51   # md5sum output collection
+          - 33fb7d512bf21f04847eca58cea46e74+51   # rev output collection
+          - 912e04aa3db04aba008cf5cd46c277b2+112  # runner output json
+    out: [out, success]
+    run: framework/testcase.cwl
+
+  twostep-both-remote:
+    in:
+      arvados_api_token: arvados_api_token
+      arvado_api_host_insecure: arvado_api_host_insecure
+      arvados_api_hosts: arvados_api_hosts
+      arvados_cluster_ids: arvados_cluster_ids
+      acr: acr
+      wf:
+        default:
+          class: File
+          location: cases/twostep-both-remote.cwl
+          secondaryFiles:
+            - class: File
+              location: cases/md5sum.cwl
+            - class: File
+              location: cases/rev.cwl
+      obj:
+        default:
+          inp:
+            class: File
+            location: data/twostep-both-remote.txt
+        valueFrom: |-
+          ${
+          self["md5sumCluster"] = inputs.arvados_cluster_ids[1];
+          self["revCluster"] = inputs.arvados_cluster_ids[1];
+          return self;
+          }
+      runner_cluster: { valueFrom: "$(inputs.arvados_cluster_ids[0])" }
+      scrub_image: {default: "arvados/fed-test:twostep-both-remote"}
+      scrub_collections:
+        default:
+          - 3c5e39939cf197d304ac1eac20841238+71   # input collection
+          - 3edb99aa607731593969cdab663d65b4+51   # md5sum output collection
+          - a91625b7139e60fe61a88cae42fbee13+51   # rev output collection
+          - ddfa58a81953dad08436d571615dd584+112  # runner output json
+    out: [out, success]
+    run: framework/testcase.cwl
+
   # also: twostep-all-remote