[ARVADOS] updated: 14dbdda455cb0e49b8848575337c5e7806747ee7

git at public.curoverse.com git at public.curoverse.com
Wed Jul 15 15:43:58 EDT 2015


Summary of changes:
 .../controllers/collections_controller_test.rb     |  39 ++++++++++
 .../test/integration/collection_upload_test.rb     |   7 --
 .../workbench/test/integration/collections_test.rb |  45 ------------
 doc/_config.yml                                    |   1 +
 doc/_includes/_arv_copy_expectations.liquid        |   3 +
 doc/images/api-token-host.png                      | Bin 0 -> 25207 bytes
 doc/user/topics/arv-copy.html.textile.liquid       |  80 +++++++++++++++++++++
 services/keepstore/handler_test.go                 |   3 +
 services/keepstore/keepstore.go                    |  12 ++--
 services/keepstore/trash_worker.go                 |  13 +++-
 services/keepstore/trash_worker_test.go            |  29 ++++++++
 11 files changed, 173 insertions(+), 59 deletions(-)
 create mode 100644 doc/_includes/_arv_copy_expectations.liquid
 create mode 100644 doc/images/api-token-host.png
 create mode 100644 doc/user/topics/arv-copy.html.textile.liquid

       via  14dbdda455cb0e49b8848575337c5e7806747ee7 (commit)
       via  c3a7bb61e982ff5b0747204b79c4ca759c19b537 (commit)
       via  0d9da683cb9572f6b5ba3f65376066938e701fb4 (commit)
       via  66c19e11db2626bd82eb755ea6552ce5caec69af (commit)
       via  1d82713672c3f6304b8f5d7d014ee39fa15bc579 (commit)
       via  beab0d6bf936becea2a92c6778c2008d451db0fc (commit)
       via  0628f0c1d83fc71d4b0913f4f3fb90e4ad1632f2 (commit)
       via  421c879e077ce8f644553ba3a1481cb55529ee33 (commit)
       via  8f589475096eb42dd1eccfbfbfc1fd5bc8f4e8ba (commit)
       via  7adf48e3633942e40b3943db8a7a31ec23d12a5b (commit)
       via  d5dbaeb59cb702793b926a63cabbeaa37f96dcfd (commit)
       via  66380d0e89c00559123ceda8e74e3b1487f4a95a (commit)
       via  603992242f91426818fd56317c6adf4521f9500c (commit)
       via  9053b511d514aa3e902259d3070ba439bfae6613 (commit)
       via  9d52ea83290cab293229815286579ab6a1584f9e (commit)
       via  6196d3280c04dabf2f347a55ed5d034e6bf5aa39 (commit)
       via  becec5efdb1a5e031f20d30393dcccf87232118d (commit)
       via  0581bd67385a585beb2d6ee5392ce7cf9d526873 (commit)
       via  e3ab22d08738c5aedb3e021e47959c1548f62ead (commit)
       via  5b311db10a1f745d2b7018f4fd1ce462550f1bc6 (commit)
       via  6e3e3c5c11a673f2347876368993da9a3715d8f3 (commit)
      from  2c3c9f64426e825295aeb1f4265d67429ee14cf6 (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 14dbdda455cb0e49b8848575337c5e7806747ee7
Merge: c3a7bb6 0d9da68
Author: Manoj <jonam33 at gmail.com>
Date:   Wed Jul 15 15:37:42 2015 -0400

    Merge branch 'master' of git.curoverse.com:arvados into 6465-optimize-workbench-integration-tests


commit c3a7bb61e982ff5b0747204b79c4ca759c19b537
Author: Manoj <jonam33 at gmail.com>
Date:   Wed Jul 15 15:28:31 2015 -0400

    6465-Added tests to collections_controller_test, removed 4 tests
    from collections_test and one test from collections_upload_test.

diff --git a/apps/workbench/test/controllers/collections_controller_test.rb b/apps/workbench/test/controllers/collections_controller_test.rb
index d046d88..7d64384 100644
--- a/apps/workbench/test/controllers/collections_controller_test.rb
+++ b/apps/workbench/test/controllers/collections_controller_test.rb
@@ -475,4 +475,43 @@ class CollectionsControllerTest < ActionController::TestCase
     assert_includes @response.body, 'Content address'
     refute_nil css_select('[href="#Advanced"]')
   end
+
+  test "can view empty collection" do
+    get :show, {id: 'd41d8cd98f00b204e9800998ecf8427e+0'}, session_for(:active)
+    assert_includes @response.body, 'The following collections have this content'
+  end
+
+  test "collection portable data hash redirect" do
+    di = api_fixture('collections')['docker_image']
+    get :show, {id: di['portable_data_hash']}, session_for(:active)
+    assert_match /\/collections\/#{di['uuid']}/, @response.redirect_url
+  end
+
+  test "collection portable data hash with multiple matches" do
+    pdh = api_fixture('collections')['foo_file']['portable_data_hash']
+    get :show, {id: pdh}, session_for(:admin)
+    matches = api_fixture('collections').select {|k,v| v["portable_data_hash"] == pdh}
+    assert matches.size > 1
+
+    matches.each do |k,v|
+      assert_match /href="\/collections\/#{v['uuid']}".*#{v['name']}<\/a>/, @response.body
+    end
+
+    assert_includes @response.body, 'The following collections have this content:'
+    assert_not_includes @response.body, 'more results are not shown'
+    assert_not_includes @response.body, 'Activity'
+    assert_not_includes @response.body, 'Sharing and permissions'
+  end
+
+  test "collection page renders name" do
+    collection = api_fixture('collections')['foo_file']
+    get :show, {id: collection['uuid']}, session_for(:active)
+    assert_includes @response.body, collection['name']
+    assert_match /href="#{collection['uuid']}.*foo.*/, @response.body
+  end
+
+  test "No Upload tab on non-writable collection" do
+    get :show, {id: api_fixture('collections')['user_agreement']['uuid']}, session_for(:active)
+    assert_not_includes @response.body, '<a href="#Upload"'
+  end
 end
diff --git a/apps/workbench/test/integration/collection_upload_test.rb b/apps/workbench/test/integration/collection_upload_test.rb
index 6960d3b..62efee4 100644
--- a/apps/workbench/test/integration/collection_upload_test.rb
+++ b/apps/workbench/test/integration/collection_upload_test.rb
@@ -28,13 +28,6 @@ class CollectionUploadTest < ActionDispatch::IntegrationTest
     assert_selector 'div#Upload.active div.panel'
   end
 
-  test "No Upload tab on non-writable collection" do
-    need_javascript
-    visit(page_with_token 'active',
-          '/collections/'+api_fixture('collections')['user_agreement']['uuid'])
-    assert_no_selector '.nav-tabs Upload'
-  end
-
   test "Upload two empty files with the same name" do
     need_selenium "to make file uploads work"
     visit page_with_token 'active', sandbox_path
diff --git a/apps/workbench/test/integration/collections_test.rb b/apps/workbench/test/integration/collections_test.rb
index 2eee6fe..4f66e9d 100644
--- a/apps/workbench/test/integration/collections_test.rb
+++ b/apps/workbench/test/integration/collections_test.rb
@@ -20,17 +20,6 @@ class CollectionsTest < ActionDispatch::IntegrationTest
     assert_text "Copy of #{collection_name}"
   end
 
-  test "Collection page renders name" do
-    Capybara.current_driver = :rack_test
-    uuid = api_fixture('collections')['foo_file']['uuid']
-    coll_name = api_fixture('collections')['foo_file']['name']
-    visit page_with_token('active', "/collections/#{uuid}")
-    assert(page.has_text?(coll_name), "Collection page did not include name")
-    # Now check that the page is otherwise normal, and the collection name
-    # isn't only showing up in an error message.
-    assert(page.has_link?('foo'), "Collection page did not include file link")
-  end
-
   def check_sharing(want_state, link_regexp)
     # We specifically want to click buttons.  See #4291.
     if want_state == :off
@@ -91,13 +80,6 @@ class CollectionsTest < ActionDispatch::IntegrationTest
     end
   end
 
-  test "can view empty collection" do
-    Capybara.current_driver = :rack_test
-    uuid = 'd41d8cd98f00b204e9800998ecf8427e+0'
-    visit page_with_token('active', "/collections/#{uuid}")
-    assert page.has_text?(/This collection is empty|The following collections have this content/)
-  end
-
   test "combine selected collections into new collection" do
     foo_collection = api_fixture('collections')['foo_file']
     bar_collection = api_fixture('collections')['bar_file']
@@ -191,33 +173,6 @@ class CollectionsTest < ActionDispatch::IntegrationTest
     assert(page.has_text?('file2_in_subdir4.txt'), 'file not found - file1_in_subdir4.txt')
   end
 
-  test "Collection portable data hash redirect" do
-    di = api_fixture('collections')['docker_image']
-    visit page_with_token('active', "/collections/#{di['portable_data_hash']}")
-
-    # check redirection
-    assert current_path.end_with?("/collections/#{di['uuid']}")
-    assert page.has_text?("docker_image")
-    assert page.has_text?("Activity")
-    assert page.has_text?("Sharing and permissions")
-  end
-
-  test "Collection portable data hash with multiple matches" do
-    pdh = api_fixture('collections')['foo_file']['portable_data_hash']
-    visit page_with_token('admin', "/collections/#{pdh}")
-
-    matches = api_fixture('collections').select {|k,v| v["portable_data_hash"] == pdh}
-    assert matches.size > 1
-
-    matches.each do |k,v|
-      assert page.has_link?(v["name"]), "Page /collections/#{pdh} should contain link '#{v['name']}'"
-    end
-    assert_text 'The following collections have this content:'
-    assert_no_text 'more results are not shown'
-    assert_no_text 'Activity'
-    assert_no_text 'Sharing and permissions'
-  end
-
   test "Collection portable data hash with multiple matches with more than one page of results" do
     pdh = api_fixture('collections')['baz_file']['portable_data_hash']
     visit page_with_token('admin', "/collections/#{pdh}")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list