[ARVADOS] updated: b1aa428167b50c40d64253a8faf4f0783759dca7

git at public.curoverse.com git at public.curoverse.com
Mon Apr 13 10:16:46 EDT 2015


Summary of changes:
 .../test/controllers/actions_controller_test.rb    | 40 +++++++++++-----------
 sdk/ruby/test/test_collection.rb                   |  2 +-
 2 files changed, 21 insertions(+), 21 deletions(-)

       via  b1aa428167b50c40d64253a8faf4f0783759dca7 (commit)
       via  4bbb24c09b3e692bef993a85f788cef911bb3332 (commit)
      from  79f2985e90fe846f7e0120b63cf24010f04bd871 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b1aa428167b50c40d64253a8faf4f0783759dca7
Author: Brett Smith <brett at curoverse.com>
Date:   Mon Apr 13 10:16:28 2015 -0400

    5614: Fixup Ruby SDK cp_r test.

diff --git a/sdk/ruby/test/test_collection.rb b/sdk/ruby/test/test_collection.rb
index 78d665a..e2a39bc 100644
--- a/sdk/ruby/test/test_collection.rb
+++ b/sdk/ruby/test/test_collection.rb
@@ -226,7 +226,7 @@ class CollectionTest < Minitest::Test
   def test_copy_stream_over_file_raises_ENOTDIR(source="./s1", target="./f2")
     coll = Arv::Collection.new(TWO_BY_TWO_MANIFEST_S)
     assert_raises(Errno::ENOTDIR) do
-      coll.cp_r("./s1", target)
+      coll.cp_r(source, target)
     end
   end
 

commit 4bbb24c09b3e692bef993a85f788cef911bb3332
Author: Brett Smith <brett at curoverse.com>
Date:   Mon Apr 13 09:57:09 2015 -0400

    5614: Use assert_includes very consistently in combine collections tests.

diff --git a/apps/workbench/test/controllers/actions_controller_test.rb b/apps/workbench/test/controllers/actions_controller_test.rb
index e9063df..26ef67b 100644
--- a/apps/workbench/test/controllers/actions_controller_test.rb
+++ b/apps/workbench/test/controllers/actions_controller_test.rb
@@ -27,7 +27,7 @@ class ActionsControllerTest < ActionController::TestCase
 
     assert_response 302   # collection created and redirected to new collection page
 
-    assert response.headers['Location'].include? '/collections/'
+    assert_includes(response.headers['Location'], '/collections/')
     new_collection_uuid = response.headers['Location'].split('/')[-1]
 
     use_token :active
@@ -54,7 +54,7 @@ class ActionsControllerTest < ActionController::TestCase
 
     assert_response 302   # collection created and redirected to new collection page
 
-    assert response.headers['Location'].include? '/collections/'
+    assert_includes(response.headers['Location'], '/collections/')
     new_collection_uuid = response.headers['Location'].split('/')[-1]
 
     use_token :active
@@ -87,26 +87,26 @@ class ActionsControllerTest < ActionController::TestCase
     collection = Collection.select([:uuid, :manifest_text]).where(uuid: new_collection_uuid).first
     manifest_text = collection['manifest_text']
 
-    assert manifest_text.include?('foo'), 'Not found foo in new collection manifest text'
-    assert manifest_text.include?('foo(1)'), 'Not found foo(1) in new collection manifest text'
+    assert_includes(manifest_text, 'foo')
+    assert_includes(manifest_text, 'foo(1)')
 
     streams = manifest_text.split "\n"
     streams.each do |stream|
       if stream.start_with? './dir1'
         # dir1 stream
-        assert stream.include?(':alice(1)'), "Not found: alice(1) in dir1 in manifest text #{manifest_text}"
-        assert stream.include?(':alice.txt'), "Not found: alice.txt in dir1 in manifest text #{manifest_text}"
-        assert stream.include?(':alice(1).txt'), "Not found: alice(1).txt in dir1 in manifest text #{manifest_text}"
-        assert stream.include?(':bob.txt'), "Not found: bob.txt in dir1 in manifest text #{manifest_text}"
-        assert stream.include?(':carol.txt'), "Not found: carol.txt in dir1 in manifest text #{manifest_text}"
+        assert_includes(stream, ':alice(1)')
+        assert_includes(stream, ':alice.txt')
+        assert_includes(stream, ':alice(1).txt')
+        assert_includes(stream, ':bob.txt')
+        assert_includes(stream, ':carol.txt')
       elsif stream.start_with? './dir2'
         # dir2 stream
-        assert stream.include?(':alice.txt'), "Not found: alice.txt in dir2 in manifest text #{manifest_text}"
-        assert stream.include?(':alice(1).txt'), "Not found: alice(1).txt in dir2 in manifest text #{manifest_text}"
+        assert_includes(stream, ':alice.txt')
+        assert_includes(stream, ':alice(1).txt')
       elsif stream.start_with? '. '
         # . stream
-        assert stream.include?(':foo'), "Not found: foo in . in manifest text #{manifest_text}"
-        assert stream.include?(':foo(1)'), "Not found: foo(1) in . in manifest text #{manifest_text}"
+        assert_includes(stream, ':foo')
+        assert_includes(stream, ':foo(1)')
       end
     end
   end
@@ -120,7 +120,7 @@ class ActionsControllerTest < ActionController::TestCase
 
     assert_response 302   # collection created and redirected to new collection page
 
-    assert response.headers['Location'].include? '/collections/'
+    assert_includes(response.headers['Location'], '/collections/')
     new_collection_uuid = response.headers['Location'].split('/')[-1]
 
     use_token :active
@@ -131,12 +131,12 @@ class ActionsControllerTest < ActionController::TestCase
     assert_equal 2, streams.length
     streams.each do |stream|
       if stream.start_with? './dir1'
-        assert stream.include?('foo'), 'Not found: foo in dir1'
+        assert_includes(stream, 'foo')
       elsif stream.start_with? '. '
-        assert stream.include?('foo'), 'Not found: foo in .'
+        assert_includes(stream, 'foo')
       end
     end
-    assert !manifest_text.include?('foo(1)'), 'Found foo(1) in new collection manifest text'
+    refute_includes(manifest_text, 'foo(1)')
   end
 
   test "combine foo files from two different collection streams and expect proper filename suffixes" do
@@ -148,7 +148,7 @@ class ActionsControllerTest < ActionController::TestCase
 
     assert_response 302   # collection created and redirected to new collection page
 
-    assert response.headers['Location'].include? '/collections/'
+    assert_includes(response.headers['Location'], '/collections/')
     new_collection_uuid = response.headers['Location'].split('/')[-1]
 
     use_token :active
@@ -157,7 +157,7 @@ class ActionsControllerTest < ActionController::TestCase
 
     streams = manifest_text.split "\n"
     assert_equal 1, streams.length, "Incorrect number of streams in #{manifest_text}"
-    assert manifest_text.include?('foo'), "Not found foo in new collection manifest text #{manifest_text}"
-    assert manifest_text.include?('foo(1)'), "Not found foo(1) in new collection manifest text #{manifest_text}"
+    assert_includes(manifest_text, 'foo')
+    assert_includes(manifest_text, 'foo(1)')
   end
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list