[ARVADOS] updated: 0198b4937df2be79e41ea76ea6c31841441f4f2c

git at public.curoverse.com git at public.curoverse.com
Mon Nov 10 17:16:55 EST 2014


Summary of changes:
 services/api/test/functional/arvados/v1/groups_controller_test.rb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

       via  0198b4937df2be79e41ea76ea6c31841441f4f2c (commit)
      from  fbd2326841005c1a288c65502dc038f26923ed65 (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 0198b4937df2be79e41ea76ea6c31841441f4f2c
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Nov 10 16:50:15 2014 -0500

    4434: use select! instead of &= to preserve duplicates.

diff --git a/services/api/test/functional/arvados/v1/groups_controller_test.rb b/services/api/test/functional/arvados/v1/groups_controller_test.rb
index 294afc2..c974076 100644
--- a/services/api/test/functional/arvados/v1/groups_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/groups_controller_test.rb
@@ -152,8 +152,12 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase
       end.uniq do |name|
         name[0]
       end
-      # Array#& is documented to preserve order of sorted_names.
-      sorted_names &= reliably_sortable_names
+      # Preserve order of sorted_names. But do not use &=. If
+      # sorted_names has out-of-order duplicates, we want to preserve
+      # them here, so we can detect them and fail the test below.
+      sorted_names.select! do |name|
+        reliably_sortable_names.include? name
+      end
       actually_checked_anything = false
       previous = nil
       sorted_names.each do |entry|

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list