From ff843a40de882d22dd2a5e408c77a2fa4720cc7d Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 3 May 2023 13:50:31 -0400 Subject: [PATCH] 20470: Fix tests Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- sdk/python/arvados-v1-discovery.json | 6 ++++++ .../test/functional/arvados/v1/schema_controller_test.rb | 2 +- services/api/test/integration/collections_api_test.rb | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sdk/python/arvados-v1-discovery.json b/sdk/python/arvados-v1-discovery.json index 2fb9678c34..f015978bdf 100644 --- a/sdk/python/arvados-v1-discovery.json +++ b/sdk/python/arvados-v1-discovery.json @@ -3055,6 +3055,12 @@ "description": "", "location": "query" }, + "select": { + "type": "array", + "description": "Attributes of each object to return in the response.", + "required": false, + "location": "query" + }, "distinct": { "type": "boolean", "required": false, diff --git a/services/api/test/functional/arvados/v1/schema_controller_test.rb b/services/api/test/functional/arvados/v1/schema_controller_test.rb index f96f1af537..65a2b64b8a 100644 --- a/services/api/test/functional/arvados/v1/schema_controller_test.rb +++ b/services/api/test/functional/arvados/v1/schema_controller_test.rb @@ -83,7 +83,7 @@ class Arvados::V1::SchemaControllerTest < ActionController::TestCase group_index_params = discovery_doc['resources']['groups']['methods']['index']['parameters'] group_contents_params = discovery_doc['resources']['groups']['methods']['contents']['parameters'] - assert_equal group_contents_params.keys.sort, (group_index_params.keys - ['select'] + ['uuid', 'recursive', 'include', 'include_old_versions']).sort + assert_equal group_contents_params.keys.sort, (group_index_params.keys + ['uuid', 'recursive', 'include', 'include_old_versions']).sort recursive_param = group_contents_params['recursive'] assert_equal 'boolean', recursive_param['type'] diff --git a/services/api/test/integration/collections_api_test.rb b/services/api/test/integration/collections_api_test.rb index baca6e2781..1ac5eb5c74 100644 --- a/services/api/test/integration/collections_api_test.rb +++ b/services/api/test/integration/collections_api_test.rb @@ -95,7 +95,7 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest }, headers: auth(:active) assert_response 422 - assert_match(/Invalid attribute.*bogus/, json_response['errors'].join(' ')) + assert_match(/ArgumentError: Attribute selection list cannot be empty/, json_response['errors'].join(' ')) end test "get index with select= (invalid attribute type) responds 422" do @@ -106,7 +106,7 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest }, headers: auth(:active) assert_response 422 - assert_match(/Invalid attribute.*bogus/, json_response['errors'].join(' ')) + assert_match(/ArgumentError: Attribute selection list cannot be empty/, json_response['errors'].join(' ')) end test "controller 404 response is json" do -- 2.30.2