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

[MDS-6227] Add administrative amendments and filter to now_gis_export API #3292

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

taraepp
Copy link
Collaborator

@taraepp taraepp commented Nov 1, 2024

Objective

  • remove the filtering out of administrative amendments from now gis view
  • add it as a column in the view, so it can be filtered for
  • add it as a parameter on the now gis endpoint

MDS-6227

Testing considerations

  • the automatic tests that I added can only look at the status code of the response, once you try to look at the data everything kind of falls apart because the view depends on tables that don't exist in the test context
  • so it was all tested manually/locally
  1. changed 2/800 now_application_identity records to have an application_type_code of ADA instead of NOW
  2. recreated the view locally (basically ran the migration in Postico, taking out materialized, with data, and TABLESPACE pg_default, and simplified the first statement to just a DROP VIEW)
  3. added a console log in now_application_gis_export_resource.py-> get-> generate (logged r)
  4. made a call in postman to http://localhost:5000/exports/now-application-gis-export?application_type_code=ADA and watched the logs in core-api container (postman can't easily handle streaming responses and so only the header is visible!)
  5. Saw that the two results (and only the two results) that I had changed to ADA were logged

…e select, add it to the API model, add it as a filter, do some very basic testing
Copy link

sonarcloud bot commented Nov 1, 2024

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_core-api'

Failed conditions
70.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

assert get_resp.status_code == 200

def test_now_application_gis_export_success_no_filter(test_client, db_session, auth_headers):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yay more tests!

Copy link
Collaborator

@matbusby-fw matbusby-fw left a comment

Choose a reason for hiding this comment

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

Everything looks solid to me. Always a little bit annoying working with the stuff that only exists in Prod.

@taraepp taraepp merged commit da65aec into develop Nov 4, 2024
10 of 11 checks passed
@taraepp taraepp deleted the mds-6227-gis-admin-amendments branch November 4, 2024 18:49
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.

3 participants