X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f8991d36180bf9c2c261dee519b0c878306a35d5..5d843ab702bd516257dda1a872d45755e5170678:/sdk/cli/test/test_arv-collection-create.rb diff --git a/sdk/cli/test/test_arv-collection-create.rb b/sdk/cli/test/test_arv-collection-create.rb index 18bef403b7..f7a9dbe41a 100644 --- a/sdk/cli/test/test_arv-collection-create.rb +++ b/sdk/cli/test/test_arv-collection-create.rb @@ -1,14 +1,13 @@ require 'minitest/autorun' require 'digest/md5' require 'active_support/core_ext' +require 'tempfile' class TestCollectionCreate < Minitest::Test def setup end def test_small_collection - skip "Waiting unitl #4534 is implemented" - uuid = Digest::MD5.hexdigest(foo_manifest) + '+' + foo_manifest.size.to_s out, err = capture_subprocess_io do assert_arv('--format', 'uuid', 'collection', 'create', '--collection', { @@ -18,7 +17,22 @@ class TestCollectionCreate < Minitest::Test end assert /^([0-9a-z]{5}-4zz18-[0-9a-z]{15})?$/.match(out) assert_equal '', err - $stderr.puts err + end + + def test_read_resource_object_from_file + tempfile = Tempfile.new('collection') + begin + tempfile.write({manifest_text: foo_manifest}.to_json) + tempfile.close + out, err = capture_subprocess_io do + assert_arv('--format', 'uuid', + 'collection', 'create', '--collection', tempfile.path) + end + assert /^([0-9a-z]{5}-4zz18-[0-9a-z]{15})?$/.match(out) + assert_equal '', err + ensure + tempfile.unlink + end end protected