[ARVADOS] updated: 1.3.0-998-g9052027ce
Git user
git at public.curoverse.com
Tue Jun 4 19:30:35 UTC 2019
Summary of changes:
.../api/test/integration/collections_api_test.rb | 23 ++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
via 9052027ce0c8e3f3a338b4b1541bf4119185c327 (commit)
from 2b2482b42492de157229b900a85e9da589c5ab67 (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 9052027ce0c8e3f3a338b4b1541bf4119185c327
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Tue Jun 4 16:30:01 2019 -0300
15306: Adds testing on collections#show that expose the bug.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
diff --git a/services/api/test/integration/collections_api_test.rb b/services/api/test/integration/collections_api_test.rb
index a004ae910..b7194b679 100644
--- a/services/api/test/integration/collections_api_test.rb
+++ b/services/api/test/integration/collections_api_test.rb
@@ -276,7 +276,6 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
end
[
- ["", false],
["false", false],
["0", false],
["true", true],
@@ -285,16 +284,24 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
test "include_trash=#{param.inspect} param encoding via query string should be interpreted as include_trash=#{truthiness}" do
expired_col = collections(:expired_collection)
assert expired_col.is_trashed
+ # Try #index first
get("/arvados/v1/collections?include_trash=#{param}&filters=#{[['uuid','=',expired_col.uuid]].to_json}",
headers: auth(:active))
assert_response :success
assert_not_nil json_response['items']
assert_equal truthiness, json_response['items'].collect {|c| c['uuid']}.include?(expired_col.uuid)
+ # Try #show next
+ get("/arvados/v1/collections/#{expired_col.uuid}/?include_trash=#{param}",
+ headers: auth(:active))
+ if truthiness
+ assert_response :success
+ else
+ assert_response 404
+ end
end
end
[
- ["", false],
["false", false],
["0", false],
["true", true],
@@ -307,6 +314,7 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
['include_trash', param],
['filters', [['uuid','=',expired_col.uuid]].to_json],
]
+ # Try #index first
get "/arvados/v1/collections",
params: URI.encode_www_form(params),
headers: {
@@ -315,6 +323,17 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
assert_response :success
assert_not_nil json_response['items']
assert_equal truthiness, json_response['items'].collect {|c| c['uuid']}.include?(expired_col.uuid)
+ # Try #show next
+ get "/arvados/v1/collections",
+ params: URI.encode_www_form([['include_trash', param]]),
+ headers: {
+ "Content-type" => "application/x-www-form-urlencoded"
+ }.update(auth(:active))
+ if truthiness
+ assert_response :success
+ else
+ assert_response 404
+ end
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list