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

Set TrustProvider to use academies db instead of academies api #175

Conversation

dynamictulip
Copy link
Collaborator

@dynamictulip dynamictulip commented Oct 13, 2023

This PR partly implements User Story 134572: Build: Connect to Academies DB. It removes the last use of the academies API and makes the system entirely use the academies db instead.

Removing redundant academies api classes will be a separate PR.

Changes

  • Move ITrustProvider to DfE.FindInformationAcademiesTrusts.Data project
  • Remove TrustProvider that calls the academies api
  • Add TrustProvider that transforms groups from the academies db
  • Change routing parameter from Ukprn to Uid
  • Add ability to mock db set in a way that allows async EF core methods to work
  • Change TrustSearch.SearchAsync to be properly asynchronous

Screenshots of UI changes

No UI changes

@dynamictulip dynamictulip temporarily deployed to development October 13, 2023 16:17 — with GitHub Actions Inactive
@dynamictulip dynamictulip temporarily deployed to development October 13, 2023 16:20 — with GitHub Actions Inactive
dynamictulip and others added 5 commits October 16, 2023 09:14
These new mocks allow methods using async EF core to be mocked
Also change `TrustSearch` to use new async-compatible mocks
the GroupUid will be used as the primary reference number when retrieving trusts. ukprn will still be a value returned and references to it will remain, just not used as a primary key.
We want to keep our language in the web project consistent with that of our users in order to make the system easier to maintain - we'd started to drift already with `GroupUid`, `Uid` and `TrustId` all meaning the same thing. `GroupUid` is language specific to the academies database so we will keep it there and use `Uid` in all other scenarios.

Also refactored `SearchModelTests`
@dynamictulip dynamictulip force-pushed the academies-db-connection/trust-provider branch from 426fb0a to 3c803f7 Compare October 16, 2023 08:14
@dynamictulip dynamictulip temporarily deployed to development October 16, 2023 08:14 — with GitHub Actions Inactive
@dynamictulip dynamictulip temporarily deployed to development October 16, 2023 08:17 — with GitHub Actions Inactive
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@dynamictulip dynamictulip merged commit be71dee into academies-db-connection-feature Oct 16, 2023
7 of 8 checks passed
@dynamictulip dynamictulip deleted the academies-db-connection/trust-provider branch October 16, 2023 09:31
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.

3 participants