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

chore: get one trackedEntity via path and query param is identical DHIS2-18541 #19377

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

teleivo
Copy link
Contributor

@teleivo teleivo commented Dec 4, 2024

as already done for /tracker/events in #18943

  • Program program parameter was always null in DefaultTrackedEntityService.
  • Make controller test a postgres one. The controller test was only able to test the /tracker/trackedEntities/{uid} using H2 and not the collection one.
  • Set default orgUnitMode in OperationParams to ACCESSIBLE as this is the safest/least surprising/mostly what we want. null is not a valid and makes the OperationParams harder to use.

Next

  • migrate the remaining tests in the controller test to use the json fixtures instead of the manager to setup their data. Using the manager leads to data that would not pass our importer.
  • (next year 😅) improve test setup
    • We need to make our test code more composable. Extract a setup class to create metadata/tracker data so we are free to extend any test class and do not create the next TestBase 😬
    • We need to be able to share test code across controller and service integration tests. This is currently not possible due to our module setup. Unless we put test code into src/main in the tracker module. Should we merge the test-integration and test-web-api modules? We need to investigate the pros/cons.

@teleivo teleivo force-pushed the DHIS2-18541 branch 5 times, most recently from 2bd54cd to f731f93 Compare December 4, 2024 14:50
Copy link

sonarcloud bot commented Dec 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
6 New issues
3 New Blocker Issues (required ≤ 0)
6 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

1 participant