Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

[BUG] Failing tests with /osm-users endpoints #331

Open
NicolasGrosjean opened this issue Sep 19, 2022 · 0 comments
Open

[BUG] Failing tests with /osm-users endpoints #331

NicolasGrosjean opened this issue Sep 19, 2022 · 0 comments
Labels
priority:medium type:bug Something isn't working

Comments

@NicolasGrosjean
Copy link
Contributor

See a1a7d62 and 7980056 for the tests from #326

Feel free to edit the issue to be more efficient and/or provide feedbacks for next report.

osm-users/ids/

test_osm_users_ids_no_user

Diagnostic

There is an internal 500 error when there is no user (the SQL execution fails).

Proposals

  • Check the case the userNames list is empty in a validator and so return a 422 code
  • OR Check the case the userNames list is empty before running code after validators and return a 200 code with empty list

test_osm_users_ids_bad_timestamp_order

Diagnostic

When the timestamp are not in the good order, the result is an empty list.

Proposal

  • Return a 422 code
  • Avoid copy-paste by moving the check of DateStampParams to a new class and makes DateStampParams and UsersListParams inherit from it

osm-users/statistics/

test_osm_users_statistics_project_empty and test_osm_users_statistics_missing_param

Diagnostic

The projectIds field is ignored by the API (it can also be missing )

Proposals

  • Remove the projectIds field
  • OR Filter changesets using created_at, min_lat, max_lat, min_lon, max_lon to filter changesets which are done in the time and geography area of the projects
  • OR Filter changesets using created_at to filter changesets on time the user do a mapping or a validation on the Tasking Manager

Bad return type compared to the documentation

Diagnostic

The result is a list of UserStatistics whereas in the document it is a UserStatistics.

In addition like only one user is set, there is only an element to the list.

Proposals

  • Return directly a UserStatistics
  • OR If the UI needs a list, update the documentation
@NicolasGrosjean NicolasGrosjean added the type:bug Something isn't working label Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority:medium type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants