[ARVADOS] updated: 7112a411de36be33f6857aea3bc750a87b139854
git at public.curoverse.com
git at public.curoverse.com
Wed Mar 19 11:24:20 EDT 2014
Summary of changes:
.../functional/arvados/v1/users_controller_test.rb | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
via 7112a411de36be33f6857aea3bc750a87b139854 (commit)
from 3e5b4f4602903d00650aa7d57a6934617468dd9f (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 7112a411de36be33f6857aea3bc750a87b139854
Author: radhika chippada <radhika at radhika.curoverse>
Date: Wed Mar 19 11:12:53 2014 -0400
More asserts for links
diff --git a/services/api/test/functional/arvados/v1/users_controller_test.rb b/services/api/test/functional/arvados/v1/users_controller_test.rb
index 0eb252d..379db9b 100644
--- a/services/api/test/functional/arvados/v1/users_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/users_controller_test.rb
@@ -86,6 +86,8 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
# since no such vm exists, expect only three new links: oid_login_perm, repo link and link add user to 'All users' group
verify_num_links @all_links_at_start, 3
+ verify_link_exists_for_type 'User', 'permission', 'can_login', created['uuid'], created['email'], 'arvados#user', false
+
verify_link_exists_for_type 'Repository', 'permission', 'can_write', repo_name, created['uuid'], 'arvados#repository', true
verify_link_exists_for_type 'Group', 'permission', 'can_read', 'All users', created['uuid'], 'arvados#group', true
@@ -208,13 +210,13 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
verify_num_links @all_links_at_start, 3 # openid, group, and repo links. no vm link
end
- # still in progress
- test "create user with openid_prefix" do
+ test "create user with openid prefix" do
authorize_with :admin
post :create, {
repo_name: 'test_repo',
vm_uuid: 'no_such_vm',
+ openid_prefix: 'http://www.xyz.com/account',
user: {
first_name: "in_create_test_first_name",
last_name: "test_last_name",
@@ -227,6 +229,16 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
assert_not_nil created['uuid'], 'expected non-null uuid for the newly created user'
assert_not_nil created['email'], 'since email was given, expected non-nil email'
assert_nil created['identity_url'], 'even though email is provided, expected no identity_url since users_controller only creates user'
+
+ # verify links
+ # expect 3 new links: oid_login_perm, repo link, and link add user to 'All users' group. No vm link since the vm_uuid passed in is not in system
+ verify_num_links @all_links_at_start, 3
+
+ verify_link_exists_for_type 'User', 'permission', 'can_login', created['uuid'], created['email'], 'arvados#user', false
+
+ verify_link_exists_for_type 'Repository', 'permission', 'can_write', 'test_repo', created['uuid'], 'arvados#repository', true
+
+ verify_link_exists_for_type 'Group', 'permission', 'can_read', 'All users', created['uuid'], 'arvados#group', true
end
test "create user with user, vm and repo and verify links" do
@@ -251,11 +263,12 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
# expect 4 new links: oid_login_perm, repo link, vm link and link add user to 'All users' group.
verify_num_links @all_links_at_start, 4
+ verify_link_exists_for_type 'User', 'permission', 'can_login', created['uuid'], created['email'], 'arvados#user', false
+
verify_link_exists_for_type 'Repository', 'permission', 'can_write', 'test_repo', created['uuid'], 'arvados#repository', true
verify_link_exists_for_type 'Group', 'permission', 'can_read', 'All users', created['uuid'], 'arvados#group', true
-
verify_link_exists_for_type 'VirtualMachine', 'permission', 'can_login', @vm_uuid, created['uuid'], 'arvados#virtualMachine', false
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list