[ARVADOS] updated: 1.3.0-726-g263813b4e

Git user git at public.curoverse.com
Mon May 6 20:16:25 UTC 2019


Summary of changes:
 apps/workbench/test/controllers/collections_controller_test.rb | 6 ++++++
 apps/workbench/test/controllers/projects_controller_test.rb    | 4 ++++
 2 files changed, 10 insertions(+)

       via  263813b4e3d609b85de837b24cb0232a9675590f (commit)
      from  1e803e86b1ba69b9770192a9cf1e66edb125cf1d (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 263813b4e3d609b85de837b24cb0232a9675590f
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Mon May 6 17:12:30 2019 -0300

    14988: Fixes anonymous config & token usage issues on tests.
    
    After calling post/get it seems that the token is reset, so on tests with
    multiple controller/api calls there were some problems with authentication.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/apps/workbench/test/controllers/collections_controller_test.rb b/apps/workbench/test/controllers/collections_controller_test.rb
index 302820057..88287cd3f 100644
--- a/apps/workbench/test/controllers/collections_controller_test.rb
+++ b/apps/workbench/test/controllers/collections_controller_test.rb
@@ -612,6 +612,7 @@ class CollectionsControllerTest < ActionController::TestCase
     }, session: session_for(:active)
     assert_response :success
 
+    use_token :active
     # verify no 'file1' in the updated collection
     collection = Collection.select([:uuid, :manifest_text]).where(uuid: collection['uuid']).first
     assert_not_includes(collection['manifest_text'], "0:0:file1")
@@ -637,6 +638,7 @@ class CollectionsControllerTest < ActionController::TestCase
     assert_response :success
 
     # verify that "./dir1" no longer exists in this collection's manifest text
+    use_token :active
     collection = Collection.select([:uuid, :manifest_text]).where(uuid: collection['uuid']).first
     assert_match /. d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:file1 0:0:file2\n$/, collection['manifest_text']
     assert_not_includes(collection['manifest_text'], 'dir1')
@@ -661,6 +663,7 @@ class CollectionsControllerTest < ActionController::TestCase
     }, session: session_for(:active)
     assert_response :success
 
+    use_token :active
     collection = Collection.select([:uuid, :manifest_text]).where(uuid: collection['uuid']).first
     assert_match /. d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:file1renamed 0:0:file2\n.\/dir1 d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:dir1file1 0:0:dir1file2 0:0:dir1imagefile.png\n$/, collection['manifest_text']
 
@@ -675,6 +678,7 @@ class CollectionsControllerTest < ActionController::TestCase
     }, session: session_for(:active)
     assert_response :success
 
+    use_token :active
     collection = Collection.select([:uuid, :manifest_text]).where(uuid: collection['uuid']).first
     assert_match /. d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:file1renamed\n.\/dir1 d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:dir1file1 0:0:dir1file2 0:0:dir1imagefile.png 0:0:file2\n$/, collection['manifest_text']
 
@@ -689,6 +693,7 @@ class CollectionsControllerTest < ActionController::TestCase
     }, session: session_for(:active)
     assert_response :success
 
+    use_token :active
     collection = Collection.select([:uuid, :manifest_text]).where(uuid: collection['uuid']).first
     assert_match /. d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:file1renamed\n.\/dir1 d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:dir1file2 0:0:dir1imagefile.png 0:0:file2\n.\/dir2\/dir3 d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:dir1file1moved\n$/, collection['manifest_text']
 
@@ -703,6 +708,7 @@ class CollectionsControllerTest < ActionController::TestCase
     }, session: session_for(:active)
     assert_response :success
 
+    use_token :active
     collection = Collection.select([:uuid, :manifest_text]).where(uuid: collection['uuid']).first
     assert_match /. d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:file1renamed\n.\/dir1 d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:dir1file2 0:0:dir1imagefilerenamed.png 0:0:file2\n.\/dir2\/dir3 d41d8cd98f00b204e9800998ecf8427e\+0\+A(.*) 0:0:dir1file1moved\n$/, collection['manifest_text']
   end
diff --git a/apps/workbench/test/controllers/projects_controller_test.rb b/apps/workbench/test/controllers/projects_controller_test.rb
index 82b5dd061..09a6950ce 100644
--- a/apps/workbench/test/controllers/projects_controller_test.rb
+++ b/apps/workbench/test/controllers/projects_controller_test.rb
@@ -276,6 +276,8 @@ class ProjectsControllerTest < ActionController::TestCase
   end
 
   test "visit public projects page when anon config is not enabled as active user and expect 404" do
+    Rails.configuration.anonymous_user_token = nil
+    Rails.configuration.enable_public_projects_page = false
     get :public, params: {}, session: session_for(:active)
     assert_response 404
   end
@@ -288,6 +290,8 @@ class ProjectsControllerTest < ActionController::TestCase
   end
 
   test "visit public projects page when anon config is not enabled as anonymous and expect login page" do
+    Rails.configuration.anonymous_user_token = nil
+    Rails.configuration.enable_public_projects_page = false
     get :public
     assert_response :redirect
     assert_match /\/users\/welcome/, @response.redirect_url

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list