[ARVADOS] updated: 1.3.0-611-ge26648fc5

Git user git at public.curoverse.com
Fri Mar 29 19:08:48 UTC 2019


Summary of changes:
 services/api/test/unit/container_test.rb  | 19 -------------------
 services/api/test/unit/group_pdhs_test.rb | 27 +++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 19 deletions(-)
 create mode 100644 services/api/test/unit/group_pdhs_test.rb

       via  e26648fc591101349db5644c9927651f84972c3d (commit)
      from  59a1fc872723c0bafa9764b95756723f54419631 (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 e26648fc591101349db5644c9927651f84972c3d
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Fri Mar 29 15:08:36 2019 -0400

    14484: Moves test for grouping pdhs to its own file
    
    Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti at veritasgenetics.com>

diff --git a/services/api/test/unit/container_test.rb b/services/api/test/unit/container_test.rb
index 783d2a985..1a53df7da 100644
--- a/services/api/test/unit/container_test.rb
+++ b/services/api/test/unit/container_test.rb
@@ -956,23 +956,4 @@ class ContainerTest < ActiveSupport::TestCase
       assert_no_secrets_logged
     end
   end
-
-  # NOTE: Migration 20190322174136_add_file_info_to_collection.rb 
-  # relies on this test. Change with caution!
-  test "pdh_grouping_by_manifest_size" do
-    batch_size_max = 200
-    pdhs_in = ['x1+30', 'x2+30', 'x3+201', 'x4+100', 'x5+100']
-    pdh_lambda = lambda { |last_pdh, &block|
-      pdhs = pdhs_in.select{|pdh| pdh > last_pdh} 
-      pdhs.each do |p|
-        block.call(p)
-      end
-    }
-    batched_pdhs = []
-    Container.group_pdhs_for_multiple_transactions(pdh_lambda, pdhs_in.size, batch_size_max, "") do |pdhs|
-      batched_pdhs << pdhs
-    end
-    expected = [['x1+30', 'x2+30'], ['x3+201'], ['x4+100', 'x5+100']]
-    assert_equal(batched_pdhs, expected)
-  end
 end
diff --git a/services/api/test/unit/group_pdhs_test.rb b/services/api/test/unit/group_pdhs_test.rb
new file mode 100644
index 000000000..82256e61b
--- /dev/null
+++ b/services/api/test/unit/group_pdhs_test.rb
@@ -0,0 +1,27 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+require 'test_helper'
+require 'group_pdhs'
+
+# NOTE: Migration 20190322174136_add_file_info_to_collection.rb
+# relies on this test. Change with caution!
+class GroupPdhsTest < ActiveSupport::TestCase
+  test "pdh_grouping_by_manifest_size" do
+    batch_size_max = 200
+    pdhs_in = ['x1+30', 'x2+30', 'x3+201', 'x4+100', 'x5+100']
+    pdh_lambda = lambda { |last_pdh, &block|
+      pdhs = pdhs_in.select{|pdh| pdh > last_pdh} 
+      pdhs.each do |p|
+        block.call(p)
+      end
+    }
+    batched_pdhs = []
+    GroupPdhs.group_pdhs_for_multiple_transactions(pdh_lambda, pdhs_in.size, batch_size_max, "") do |pdhs|
+      batched_pdhs << pdhs
+    end
+    expected = [['x1+30', 'x2+30'], ['x3+201'], ['x4+100', 'x5+100']]
+    assert_equal(batched_pdhs, expected)
+  end
+end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list