[GPCAPIM-396] Local SDS Int Integration#188
Conversation
|
|
||
| sds = SdsFhirApiStub() | ||
| get = sds.get # type: ignore | ||
| def get( |
There was a problem hiding this comment.
I'm interested in what other people think about this pattern, but I think it's nicer than the conditional imports. We're not planning on moving to separately deployment mocks any time soon, so I think a little wrapper function is useful. Not technically part of the scope of this ticket though, so I can revert and discuss separately if we want to.
There was a problem hiding this comment.
Six of one ... for me.
| self.base_url = base_url.rstrip("/") | ||
| self.timeout = timeout | ||
| self.api_key = self._get_api_key() | ||
| self.api_key = api_key |
There was a problem hiding this comment.
This fits better with the env var pattern established in the previous ticket. If we try to read the config from the "app" variable in app.py we get circular imports
| ) -> None: | ||
| """ | ||
| Test that the controller uses the SDS URL provided in the constructor. | ||
| Test that the controller uses the SDS URL and API token provided in the constructor. |
There was a problem hiding this comment.
This unit test was checking the call to get inside the client. That means it's really testing both modules. So I've refactored a little so that the responsibility of this test is to prove that the vars are passed down to the client. It's then the responsibility of the client tests to prove that they use those vars correctly.
| ;; | ||
| int) | ||
| echo "https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/" | ||
| echo "stub" |
There was a problem hiding this comment.
PDS INT comes in another ticket, so leaving as "stub" for now
There was a problem hiding this comment.
Done the same in my INT Provider ticket 👍
davidhamill1-nhs
left a comment
There was a problem hiding this comment.
Yet to run locally, but a couple of very minor comments.
|
|
||
| sds = SdsFhirApiStub() | ||
| get = sds.get # type: ignore | ||
| def get( |
There was a problem hiding this comment.
Six of one ... for me.
| ;; | ||
| int) | ||
| echo "https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/" | ||
| echo "stub" |
There was a problem hiding this comment.
Done the same in my INT Provider ticket 👍
|
Run locally. Looks good. 👍 |
|
|
Deployment Complete
|



Description
Moves SDS connection to INT for localInt setup. Will need to make relevant secret and env var updates based on David H's work that's not merged yet.
Context
Part of proving the INT connections locally
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.