Skip to content

Data query response testing bugs #71

@fjugipe

Description

@fjugipe

Some bugs in the tool I found in the data query response testing

  1. Extent generation for the queries and general approach

    • The points_inside generate a diagonal corridor which starts quite close (but not) from the bottom left of the original API extent
      • The tests expect a response of 200 i.e. data should be found. But for example with large extents containing a single station far away from most of the data points (eq. Antartica), this will most likely never return data and will most certainly fail
      • One solution would be to generate a vertical corridor starting FROM the bottom left and ending at the top left of the original API extent, but this case does not necessarily work with position queries since the most south-est station might not also be the most eastern and the test currently takes the bottom left of the generated corridor for the position query.
    • Queries using points outside make valid queries but assert that a 400 would be correct in the case of data not found, I think the correct expected response would be 404 if the query is otherwise correct.
  2. Area queries

    • f"?coords=POLYGON({inside_polygon}) should be f"?coords=POLYGON(({inside_polygon})) for it to be correct
    • WKT Polygons should be closed, so need to add the first point also as the last one in inside_polygon and outside_polygon for area queries
      Image

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions