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

no-issue: Split DataBroker pullMetadata API per type #5288

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

kael89
Copy link
Collaborator

@kael89 kael89 commented Dec 17, 2023

Splitting DataBroker.pullMetadata into two APIs, one for data elements and one for data group.

Splitting the Service APIs will be done in another PR

['delete', [{ code: 'DHIS_01', type: 'dataElement' }, { value: 2 }, TO_OPTIONS]],
['pullMetadata', [{ code: 'DHIS_01', type: 'dataElement' }, TO_OPTIONS]],
];
it('passes mapping to service: push', async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This section is just breaking apart the parameterised tests into separate test blocks per API

I think parameterised tests should only be used for simple, pure functions where we want to test multiple variations for the same API, e.g. maths, date handling etc. They are probably overused in tupaia (guilty as charged!)

Copy link
Member

@edmofro edmofro left a comment

Choose a reason for hiding this comment

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

All lgtm!! Thank you as always @kael89

packages/aggregator/global.d.ts Outdated Show resolved Hide resolved
DB_PASSWORD=
DB_PORT=
DB_URL=
DB_USER=
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding the example

@kael89
Copy link
Collaborator Author

kael89 commented Jan 10, 2024

Thanks for the review @edmofro, can I merge this?

@edmofro
Copy link
Member

edmofro commented Jan 10, 2024

Yes go for it!

@kael89 kael89 merged commit 1365d81 into dev Jan 10, 2024
42 checks passed
@kael89 kael89 deleted the data-broker-api-split-pull-metadata branch January 10, 2024 03:03
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