[ARVADOS] updated: 970766e3167be72c1fe6abdc1609831721dbf62d
git at public.curoverse.com
git at public.curoverse.com
Tue Feb 3 19:25:09 EST 2015
Summary of changes:
.../test/controllers/collections_controller_test.rb | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
via 970766e3167be72c1fe6abdc1609831721dbf62d (commit)
via 18b5b6fa43e380549c6698b9998990a748a9d3e8 (commit)
from 56714c8df2f49a5b28ded29402d1af0cb3e45ba1 (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 970766e3167be72c1fe6abdc1609831721dbf62d
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Feb 3 19:24:33 2015 -0500
2659: Token fail during download is 404 when anon token is enabled, 302 otherwise.
diff --git a/apps/workbench/test/controllers/collections_controller_test.rb b/apps/workbench/test/controllers/collections_controller_test.rb
index b92fa42..95c0a57 100644
--- a/apps/workbench/test/controllers/collections_controller_test.rb
+++ b/apps/workbench/test/controllers/collections_controller_test.rb
@@ -176,13 +176,20 @@ class CollectionsControllerTest < ActionController::TestCase
[false, api_fixture('api_client_authorizations')['anonymous']['api_token']].
each do |anon_conf|
- test "trying to get from Keep with an unscoped reader token prompts login (anon_configured=#{anon_conf})" do
+ test "download a file using a reader token with insufficient scope (anon_conf=#{!!anon_conf})" do
Rails.configuration.anonymous_user_token = anon_conf
params = collection_params(:foo_file, 'foo')
params[:reader_token] =
api_fixture('api_client_authorizations')['active_noscope']['api_token']
get(:show_file, params)
- assert_response :redirect
+ if anon_conf
+ # Some files can be shown without a valid token, but not this one.
+ assert_response 404
+ else
+ # No files will ever be shown without a valid token. You
+ # should log in and try again.
+ assert_response :redirect
+ end
end
end
commit 18b5b6fa43e380549c6698b9998990a748a9d3e8
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Feb 3 18:22:03 2015 -0500
2659: Fix anonymous token test.
diff --git a/apps/workbench/test/controllers/collections_controller_test.rb b/apps/workbench/test/controllers/collections_controller_test.rb
index 67fc5c3..b92fa42 100644
--- a/apps/workbench/test/controllers/collections_controller_test.rb
+++ b/apps/workbench/test/controllers/collections_controller_test.rb
@@ -174,7 +174,8 @@ class CollectionsControllerTest < ActionController::TestCase
"using a reader token set the session's API token")
end
- [false, true].each do |anon_conf|
+ [false, api_fixture('api_client_authorizations')['anonymous']['api_token']].
+ each do |anon_conf|
test "trying to get from Keep with an unscoped reader token prompts login (anon_configured=#{anon_conf})" do
Rails.configuration.anonymous_user_token = anon_conf
params = collection_params(:foo_file, 'foo')
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list