Globus Search _testing Method List#

globus_sdk.SearchClient#

globus_sdk.SearchClient has registered responses for the following methods:

batch_delete_by_subject (case="default")
{
  "task_id": "7ddedefa-d7ed-11ee-875f-0242ac110002"
}
create_index (case="default")
{
  "@datatype": "GSearchIndex",
  "@version": "2017-09-01",
  "creation_date": "2021-04-05 15:05:18",
  "display_name": "Awesome Index of Awesomeness",
  "description": "An index so awesome that it simply cannot be described",
  "id": "5ac0d11c-cf5f-40c1-ae92-a38b2990dc1e",
  "is_trial": true,
  "subscription_id": null,
  "max_size_in_mb": 1,
  "num_entries": 0,
  "num_subjects": 0,
  "size_in_mb": 0,
  "status": "open"
}
create_index (case="trial_limit")
{
  "@datatype": "GError",
  "request_id": "38186e960f3a64c9d530d48ba2271285",
  "status": 409,
  "error_data": {
    "cause": "When creating an index, an 'owner' role is created automatically. If this would exceed ownership limits, this error is raised instead.",
    "constraint": "Cannot create more ownership roles on trial indices than the limit (3)"
  },
  "@version": "2017-09-01",
  "message": "Role limit exceeded",
  "code": "Conflict.LimitExceeded"
}
create_role (case="default")
{
  "creation_date": "2022-01-26 21:53:06",
  "id": "MDQ1MzAy",
  "index_id": "60d1160b-f016-40b0-8545-99619865873d",
  "principal": "urn:globus:auth:identity:46bd0f56-e24f-11e5-a510-131bef46955c",
  "principal_type": "identity",
  "role_name": "writer"
}
delete_index (case="default")
{
  "index_id": "8d14190c-2817-4b13-ad39-2391b1eec6f7",
  "acknowledged": true
}
delete_index (case="delete_pending")
{
  "@datatype": "GError",
  "request_id": "3430ce9a5f9d929ef7682e4c58363dee",
  "status": 409,
  "@version": "2017-09-01",
  "message": "Index status (delete_pending) did not match required status for this operation: open",
  "code": "Conflict.IncompatibleIndexStatus"
}
delete_role (case="default")
{
  "deleted": {
    "creation_date": "2022-01-26 21:53:06",
    "id": "MDMwMjM5",
    "index_id": "60d1160b-f016-40b0-8545-99619865873d",
    "principal": "urn:globus:auth:identity:46bd0f56-e24f-11e5-a510-131bef46955c",
    "principal_type": "identity",
    "role_name": "writer"
  },
  "success": true
}
get_role_list (case="default")
{
  "role_list": [
    {
      "creation_date": "2021-11-09 20:26:45",
      "id": "MDMwMjM5",
      "index_id": "60d1160b-f016-40b0-8545-99619865873d",
      "principal": "urn:globus:auth:identity:ae332d86-d274-11e5-b885-b31714a110e9",
      "principal_type": "identity",
      "role_name": "owner"
    },
    {
      "creation_date": "2022-01-24 15:33:41",
      "id": "MDQ0ODYz",
      "index_id": "60d1160b-f016-40b0-8545-99619865873d",
      "principal": "urn:globus:auth:identity:c699d42e-d274-11e5-bf75-1fc5bf53bb24",
      "principal_type": "identity",
      "role_name": "writer"
    }
  ]
}
post_search (case="default")
{
  "@datatype": "GSearchResult",
  "@version": "2017-09-01",
  "count": 1,
  "gmeta": [
    {
      "@datatype": "GMetaResult",
      "@version": "2019-08-27",
      "entries": [
        {
          "content": {
            "foo": "bar"
          },
          "entry_id": null,
          "matched_principal_sets": []
        }
      ],
      "subject": "foo-bar"
    }
  ],
  "has_next_page": true,
  "offset": 0,
  "total": 10
}
reopen_index (case="default")
{
  "index_id": "1d102650-373d-408a-9c66-1b90ea30c1d7",
  "acknowledged": true
}
reopen_index (case="already_open")
{
  "code": "Conflict.IncompatibleIndexStatus",
  "request_id": "e1ad6822156dea372027eee48c16e150",
  "@datatype": "GError",
  "message": "Index status (open) did not match required status for this operation: delete_pending",
  "@version": "2017-09-01",
  "status": 409
}
search (case="default")
{
  "@datatype": "GSearchResult",
  "@version": "2017-09-01",
  "count": 1,
  "gmeta": [
    {
      "@datatype": "GMetaResult",
      "@version": "2019-08-27",
      "entries": [
        {
          "content": {
            "foo": "bar"
          },
          "entry_id": null,
          "matched_principal_sets": []
        }
      ],
      "subject": "foo-bar"
    }
  ],
  "has_next_page": true,
  "offset": 0,
  "total": 10
}