[ARVADOS] updated: ed7369d4a18d11784e666246f37fc32ac3e559c4
git at public.curoverse.com
git at public.curoverse.com
Wed Nov 5 17:48:34 EST 2014
Summary of changes:
apps/workbench/test/functional/projects_controller_test.rb | 12 ++++++++++++
services/api/test/fixtures/groups.yml | 14 ++++++++++++++
2 files changed, 26 insertions(+)
via ed7369d4a18d11784e666246f37fc32ac3e559c4 (commit)
from e34d6859d936f0b82f981d44be415a46b1aa61e1 (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 ed7369d4a18d11784e666246f37fc32ac3e559c4
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Nov 5 17:48:30 2014 -0500
4389: Add test.
diff --git a/apps/workbench/test/functional/projects_controller_test.rb b/apps/workbench/test/functional/projects_controller_test.rb
index 8eb0cdc..93f794d 100644
--- a/apps/workbench/test/functional/projects_controller_test.rb
+++ b/apps/workbench/test/functional/projects_controller_test.rb
@@ -97,6 +97,18 @@ class ProjectsControllerTest < ActionController::TestCase
assert user_can_manage(:subproject_admin, "asubproject")
end
+ test "detect ownership loop in project breadcrumbs" do
+ # This test has an arbitrary time limit -- otherwise we'd just sit
+ # here forever instead of reporting that the loop was not
+ # detected. The test passes quickly, but fails slowly.
+ Timeout::timeout 10 do
+ get(:show,
+ { id: api_fixture("groups")["project_owns_itself"]["uuid"] },
+ session_for(:admin))
+ end
+ assert_response :success
+ end
+
test "project admin can remove items from the project" do
coll_key = "collection_to_remove_from_subproject"
coll_uuid = api_fixture("collections")[coll_key]["uuid"]
diff --git a/services/api/test/fixtures/groups.yml b/services/api/test/fixtures/groups.yml
index 9eaeae8..6349a82 100644
--- a/services/api/test/fixtures/groups.yml
+++ b/services/api/test/fixtures/groups.yml
@@ -208,3 +208,17 @@ fuse_owned_project:
name: FUSE Test Project
description: Test project belonging to FUSE test user
group_class: project
+
+# This wouldn't pass model validation, but it enables a workbench
+# infinite-loop test. See #4389
+project_owns_itself:
+ uuid: zzzzz-j7d0g-7rqh7hdshd5yp5t
+ owner_uuid: zzzzz-j7d0g-7rqh7hdshd5yp5t
+ created_at: 2014-11-05 22:31:24.258424340 Z
+ modified_by_client_uuid: zzzzz-ozdt8-brczlopd8u8d0jr
+ modified_by_user_uuid: 6pbr1-tpzed-000000000000000
+ modified_at: 2014-11-05 22:31:24.258242890 Z
+ name: zzzzz-j7d0g-7rqh7hdshd5yp5t
+ description: ~
+ updated_at: 2014-11-05 22:31:24.258093171 Z
+ group_class: project
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list