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: Improve raster integration tests #397

Merged
merged 12 commits into from
Aug 15, 2024
Merged

Conversation

stephenkilbourn
Copy link
Contributor

@stephenkilbourn stephenkilbourn commented Jul 17, 2024

Issue

#384

What?

This updates the existing raster integration tests to cover more of the endpoints listed in the docs. It also pulls down the Openapi Schemas from https://api.stacspec.org/v1.0.0 and validates the feature and collection results match those schemas.

Testing?

this will run with the existing script: ./scripts/run-local-tests.sh

Comment on lines 6 to 8
seeded_collection = "noaa-emergency-response"
seeded_id = "20200307aC0853900w361030"
z, x, y = 15, 8589, 12849
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for implementing this - would this PR be a good time to define these constants as fixtures? Later on, when we implement more automated integration tests, we could use these to test live environments by overriding the endpoint and items for the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the guidance. I think the updates are there now

STAC_HEALTH_ENDPOINT = "http://0.0.0.0:8081/_mgmt/ping"
SEARCH_ROUTE = "search"

RASTER_ENDPOINT = "http://0.0.0.0:8082/searches"
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I think we only had like one test for other prefixes in the raster API (i.e. /cog, /searches, stac /collections/{collection_id}/items) but maybe we should either make this RASTER_SEARCHES_ENDPOINT or remove the /searches and add it to the tests on searches? I think there was previously one stac search test /collections/{collection_id}/items{item_id} but we haven't had all that much coverage.

@smohiudd smohiudd self-requested a review August 15, 2024 18:49
Copy link
Contributor

@smohiudd smohiudd left a comment

Choose a reason for hiding this comment

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

I tested locally with ./scripts/run-local-tests.sh and the tests worked.

@stephenkilbourn stephenkilbourn merged commit 43b5ce4 into develop Aug 15, 2024
4 checks passed
@stephenkilbourn stephenkilbourn deleted the update-raster-tests branch August 15, 2024 19:05
@anayeaye
Copy link
Collaborator

nit: can we bring these item tests back next time we are working in raster API? I'm pretty sure the dashboard uses these /collections/{collection_id}/items/{item_id} endpoints and I know the notebooks rely on them

https://github.com/NASA-IMPACT/veda-backend/pull/397/files#diff-131e458a6870e9c6459ad7e9fbbaae846353b8ee197693d81683126c74744bf8L174-L195

botanical added a commit that referenced this pull request Aug 20, 2024
…ltiple domain names for prod, Improve raster integration tests, remove moto from setup. leave in requirements_dev (#423)

### 🪙 Changed/Updated
- [chore: Improve raster integration tests
#397](#397)
- [chore: remove moto from setup. leave in requirements_dev
#421](#421)

### 🩹 Fixed
- [fix: update domain names to support multiple domain names for
prod](#418 )


<details>
<summary>Authors</summary>

- Co-authored-by: Jennifer Tran
- Co-authored-by: Stephen Kilbourn


</details>
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.

4 participants