projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
12840: Differentiate "Cancelled" from "Failed" pipeline instances.
[arvados.git]
/
services
/
api
/
test
/
integration
/
collections_api_test.rb
diff --git
a/services/api/test/integration/collections_api_test.rb
b/services/api/test/integration/collections_api_test.rb
index 0bedc0726a08549711f3455f509778b1f9901de3..ac1ca66376b8b993630ba7b1c0bc14c63976a2f7 100644
(file)
--- a/
services/api/test/integration/collections_api_test.rb
+++ b/
services/api/test/integration/collections_api_test.rb
@@
-1,3
+1,7
@@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
require 'test_helper'
class CollectionsApiTest < ActionDispatch::IntegrationTest
require 'test_helper'
class CollectionsApiTest < ActionDispatch::IntegrationTest
@@
-21,7
+25,7
@@
class CollectionsApiTest < ActionDispatch::IntegrationTest
:filters => ['uuid', '=', 'ad02e37b6a7f45bbe2ead3c29a109b8a+54'].to_json
}, auth(:active)
assert_response 422
:filters => ['uuid', '=', 'ad02e37b6a7f45bbe2ead3c29a109b8a+54'].to_json
}, auth(:active)
assert_response 422
- assert_match
/nvalid element.*not an array/, json_response['errors'].join(' '
)
+ assert_match
(/nvalid element.*not an array/, json_response['errors'].join(' ')
)
end
test "get index with invalid filters (unsearchable column) responds 422" do
end
test "get index with invalid filters (unsearchable column) responds 422" do
@@
-30,7
+34,7
@@
class CollectionsApiTest < ActionDispatch::IntegrationTest
:filters => [['this_column_does_not_exist', '=', 'bogus']].to_json
}, auth(:active)
assert_response 422
:filters => [['this_column_does_not_exist', '=', 'bogus']].to_json
}, auth(:active)
assert_response 422
- assert_match
/nvalid attribute/, json_response['errors'].join(' '
)
+ assert_match
(/nvalid attribute/, json_response['errors'].join(' ')
)
end
test "get index with invalid filters (invalid operator) responds 422" do
end
test "get index with invalid filters (invalid operator) responds 422" do
@@
-39,7
+43,7
@@
class CollectionsApiTest < ActionDispatch::IntegrationTest
:filters => [['uuid', ':-(', 'displeased']].to_json
}, auth(:active)
assert_response 422
:filters => [['uuid', ':-(', 'displeased']].to_json
}, auth(:active)
assert_response 422
- assert_match
/nvalid operator/, json_response['errors'].join(' '
)
+ assert_match
(/nvalid operator/, json_response['errors'].join(' ')
)
end
test "get index with invalid filters (invalid operand type) responds 422" do
end
test "get index with invalid filters (invalid operand type) responds 422" do
@@
-48,7
+52,7
@@
class CollectionsApiTest < ActionDispatch::IntegrationTest
:filters => [['uuid', '=', {foo: 'bar'}]].to_json
}, auth(:active)
assert_response 422
:filters => [['uuid', '=', {foo: 'bar'}]].to_json
}, auth(:active)
assert_response 422
- assert_match
/nvalid operand type/, json_response['errors'].join(' '
)
+ assert_match
(/nvalid operand type/, json_response['errors'].join(' ')
)
end
test "get index with where= (empty string)" do
end
test "get index with where= (empty string)" do
@@
-73,7
+77,7
@@
class CollectionsApiTest < ActionDispatch::IntegrationTest
:select => ['bogus'].to_json
}, auth(:active)
assert_response 422
:select => ['bogus'].to_json
}, auth(:active)
assert_response 422
- assert_match
/Invalid attribute.*bogus/, json_response['errors'].join(' '
)
+ assert_match
(/Invalid attribute.*bogus/, json_response['errors'].join(' ')
)
end
test "get index with select= (invalid attribute type) responds 422" do
end
test "get index with select= (invalid attribute type) responds 422" do
@@
-82,7
+86,7
@@
class CollectionsApiTest < ActionDispatch::IntegrationTest
:select => [['bogus']].to_json
}, auth(:active)
assert_response 422
:select => [['bogus']].to_json
}, auth(:active)
assert_response 422
- assert_match
/Invalid attribute.*bogus/, json_response['errors'].join(' '
)
+ assert_match
(/Invalid attribute.*bogus/, json_response['errors'].join(' ')
)
end
test "controller 404 response is json" do
end
test "controller 404 response is json" do
@@
-243,8
+247,6
@@
class CollectionsApiTest < ActionDispatch::IntegrationTest
assert_response :success
assert_equal true, json_response['manifest_text'].include?('file4_in_subdir4.txt')
assert_response :success
assert_equal true, json_response['manifest_text'].include?('file4_in_subdir4.txt')
- created = json_response
-
# search using the filename
search_using_full_text_search 'subdir2', 0
search_using_full_text_search 'subdir2:*', 1
# search using the filename
search_using_full_text_search 'subdir2', 0
search_using_full_text_search 'subdir2:*', 1