[ARVADOS] updated: 2.1.0-2319-g733e8c44d

Git user git at public.arvados.org
Fri Apr 15 15:02:19 UTC 2022


Summary of changes:
 apps/workbench/Gemfile.lock                        |  2 +-
 doc/_layouts/default.html.liquid                   | 23 +++++++++-------------
 services/api/Gemfile.lock                          |  2 +-
 .../controllers/arvados/v1/groups_controller.rb    |  3 ++-
 .../arvados/v1/groups_controller_test.rb           | 22 +++++++++++++++++++++
 5 files changed, 35 insertions(+), 17 deletions(-)

       via  733e8c44dacf230d605fe6e5ea3f95f0abb8d823 (commit)
       via  5dc5d156d1f586f41b6341c30f3c2a202f3e037e (commit)
       via  a0da9a32ae07e4403fe3e568251f9d9d2c5b8b2f (commit)
       via  7e41c28aacf92ac968396a938fb1463aca8df750 (commit)
       via  f87d258ccb34ac92d3c0d1ceb080f5783dab1881 (commit)
      from  437d0dc1dfeea7b81999caa1c540da0903df87f7 (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 733e8c44dacf230d605fe6e5ea3f95f0abb8d823
Merge: 5dc5d156d a0da9a32a
Author: Ward Vandewege <ward at curii.com>
Date:   Fri Apr 15 11:01:48 2022 -0400

    18995: Merge branch 'main' into 18995-code-cleanup-1
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>


commit 5dc5d156d1f586f41b6341c30f3c2a202f3e037e
Author: Ward Vandewege <ward at curii.com>
Date:   Fri Apr 15 10:55:58 2022 -0400

    18995: proper fix for group class destroy method. Add a test.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/services/api/app/controllers/arvados/v1/groups_controller.rb b/services/api/app/controllers/arvados/v1/groups_controller.rb
index 8539332f1..3473c7e4e 100644
--- a/services/api/app/controllers/arvados/v1/groups_controller.rb
+++ b/services/api/app/controllers/arvados/v1/groups_controller.rb
@@ -103,7 +103,8 @@ class Arvados::V1::GroupsController < ApplicationController
 
   def destroy
     if !TRASHABLE_CLASSES.include?(@object.group_class)
-      return @object.destroy
+      @object.destroy
+      show
     else
       super # Calls destroy from TrashableController module
     end
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 fcdce0e60..369a10d45 100644
--- a/services/api/test/functional/arvados/v1/groups_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/groups_controller_test.rb
@@ -787,6 +787,28 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase
     end
   end
 
+  # the group class overrides the destroy method. Make sure that the destroyed
+  # object is returned
+  [
+    [group_class: "project"],
+    [group_class: "role"],
+    [group_class: "filter", properties: {"filters":[]}],
+  ].each do |params|
+    test "destroy group #{params} returns object" do
+      authorize_with :active
+
+      group = Group.create!(params).first
+
+      post :destroy, params: {
+            id: group.uuid,
+            format: :json,
+          }
+      assert_response :success
+      assert_not_nil json_response
+      assert_equal group.uuid, json_response["uuid"]
+    end
+  end
+
   test 'get shared owned by another user' do
     authorize_with :user_bar_in_sharing_group
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list