-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
[BACK-3183] Add ability to request connection to multiple providers #162
base: master
Are you sure you want to change the base?
Conversation
toddkazakov
commented
Oct 16, 2024
- Refactored the existing data model to support multiple providers
- The API is backward compatible to allow Tidepool Web to switch to the new endpoints and data model
- Added the ability to request twiist account connection
8044d4e
to
df8f55e
Compare
/deploy qa1 |
toddkazakov updated values.yaml file in qa1 |
toddkazakov updated flux policies file in qa1 |
toddkazakov deployed clinic tk-connect-twiist branch to qa1 namespace |
Error: 409 is at a1eba92bec367e25d41188dddda405a36a3f1094 but expected ee70c3eee31c708747c89d60e0baf56fe01b4e27! |
Describe("Create Patient", func() { | ||
It("Succeeds", func() { | ||
rec := httptest.NewRecorder() | ||
req := prepareRequest(http.MethodPost, fmt.Sprintf("/v1/clinics/%s/patients", *clinic.Id), "./test/common_fixtures/02_create_patient.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was clinic's Id ever populated before this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are executed in order. The clinic id was populated in the previous test:
Expect(json.Unmarshal(body, &clinic)).To(Succeed())
Describe("Update Data Sources", func() { | ||
It("Succeeds", func() { | ||
rec := httptest.NewRecorder() | ||
req := prepareRequest(http.MethodPut, fmt.Sprintf("/v1/patients/%s/data_sources", *patient.Id), "./test/common_fixtures/03_update_data_sources.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here, was patient ever setup before this test? Maybe I'm missing it, but isn't patient.Id
nil here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are executed in order and the id was populated in the previous test.
Describe("Send Dexcom Connection Request", func() { | ||
It("Succeeds", func() { | ||
rec := httptest.NewRecorder() | ||
req := prepareRequest(http.MethodPost, fmt.Sprintf("/v1/clinics/%s/patients/%s/connect/dexcom", *clinic.Id, *patient.Id), "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same setup .Id
nil question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are executed in order and the id was populated in the previous two tests.
summary: Connect Data Provider | ||
operationId: ConnectProvider | ||
responses: | ||
'204': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this consistent w/ the actual response code? Looks like its 200 OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need to change the spec, because the frontend expects a patient object response. Good catch.
/deploy qa4 |
toddkazakov updated values.yaml file in qa4 |
toddkazakov updated flux policies file in qa4 |
toddkazakov deployed clinic tk-connect-twiist branch to qa4 namespace |
789226d
to
0f63dfa
Compare
api/mappers.go
Outdated
return empty | ||
} | ||
requestsForProvider, exist := requests[string(provider)] | ||
if !exist || len(requests) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the intent here to check requests
to be empty or requestsForProvider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent was to check requestsForProvider
so the logic was incorrect, good catch. I have simplified this.
43b87da
to
8cb663d
Compare