11121: Added test.
authorLucas Di Pentima <lucas@curoverse.com>
Thu, 16 Feb 2017 21:11:09 +0000 (18:11 -0300)
committerLucas Di Pentima <lucas@curoverse.com>
Thu, 16 Feb 2017 21:11:09 +0000 (18:11 -0300)
sdk/cli/test/binstub_output_coll_owner/python [new file with mode: 0755]
sdk/cli/test/test_crunch-job.rb

diff --git a/sdk/cli/test/binstub_output_coll_owner/python b/sdk/cli/test/binstub_output_coll_owner/python
new file mode 100755 (executable)
index 0000000..9e2b358
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo owner_uuid: $2 >&2
+
index 0fbff2e6de670da112461da20107fa5eeaae1e9b..847f994f486842b69ad2436ea767649cfb1a0c64 100644 (file)
@@ -8,6 +8,7 @@ class TestCrunchJob < Minitest::Test
 
   JOBSPEC = {
     grep_local: {
+      owner_uuid: 'zzzzz-j7d0g-it30l961gq3t0oi',
       script: 'grep',
       script_version: 'master',
       repository: File.absolute_path('../../../..', __FILE__),
@@ -95,6 +96,14 @@ class TestCrunchJob < Minitest::Test
     assert_equal SPECIAL_EXIT[:EX_RETRY_UNLOCKED], $?.exitstatus
   end
 
+  def test_output_collection_owner_uuid
+    j = jobspec :grep_local
+    out, err = capture_subprocess_io do
+      tryjobrecord j, binstubs: ['output_coll_owner']
+    end
+    assert_match /owner_uuid: #{j['owner_uuid']}/, err
+  end
+
   def test_docker_image_missing
     skip 'API bug: it refuses to create this job in Running state'
     out, err = capture_subprocess_io do