Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deactivate Requests to External ROR API #738

Merged
merged 3 commits into from
May 6, 2024
Merged

Conversation

aaronskiba
Copy link
Collaborator

Changes proposed in this PR:

  • Deactivate External Requests to ROR API

    • Requests to https://api.ror.org/ are used for fetching organisations that may not already exist within the local db. At this time, DMP Assistant is limiting organisations to only those that exist within the local db. (New organisations are currently only created manually by DMP super admins).
    • The app is meant to handle the toggling of this config value. Setting Rails.configuration.x.ror.active = false as we did here should limit searching to only the local db (to verify this handling, see app/services/org_selection/search_service.rb).
  • Override Rails.configuration.x.ror.active to true for duration of ExternalApis::RorService RSpect tests.

    • Without this change, setting Rails.configuration.x.ror.active = false in config/initializers/external_apis/ror.rb breaks many of the ExternalApis::RorService RSpect tests.

aaronskiba added 2 commits May 2, 2024 12:42
Requests to this external API are used for fetching organisations that may not already exist within the local db. At this time, DMP Assistant is limiting organisations to only those that exist within the local db. (New organisations are currently only created manually by DMP super admins).
In order to be executed successfully, the RSpec tests within spec/services/external_apis/ror_service_spec.rb require that Rails.configuration.x.ror.active = true. Regardless of the value of this variable within config/initializers/external_apis/ror.rb, this commit overrides the value to true for the duration of the spec/services/external_apis/ror_service_spec.rb tests.
@aaronskiba aaronskiba changed the title Deactivate External Requests to ROR API Deactivate Requests to External ROR API May 2, 2024
Copy link
Collaborator

@lagoan lagoan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aaronskiba aaronskiba merged commit 29c62ae into integration May 6, 2024
13 checks passed
@aaronskiba aaronskiba deleted the aaron/disable-ror branch May 6, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants