generated from geoadmin/template-service-flask
-
Notifications
You must be signed in to change notification settings - Fork 0
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
First Release #25
Merged
First Release #25
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BGDIINF_SB-1890: Updated to latest Codebuild image aws/codebuild/standard:5.0
* now local containers for s3 bucket and dynamodb are provided and initialized in docker-compose.yml using mc and aws-cli * for some reasons the mocked dynamodb only accepts existing regions and not fake regions, while s3 does accept fake region. * in unit tests s3 bucket and dynamodb are completely mocked * mock.start() and mock_dynamodb2 are placed in unit tests __init__.py to assure they are executed as early as possible * for unit tests, a .env.testing is used and passed in the Makefile's test target to overwrite the service's env variables.
* added tearDown() to empty and delete the test bucket and DynamoDB table * added unit test for posting an invalid kml_string
in case the bucket and the table that are mocked in the unit test already exist, an error is raised. As the bucket and the table are deleted in the tearDown(), there should not be any existing bucket and table in setUp(). This also makes sure that we do not accidentally use real resources.
…ad_object_to_bucket
BGDIINF SB-1799 Adding S3, DynamoDB and unittests
…ervice_problems BGDIINF_SB-1800: remove access and secret access key
using the correct keys in the responses corrections to logs, making messages clearer, small correction to test to account for changes adding base test class for unit tests in routes added missing underscore removing unused field in json response
Feature BGDIINF_SB-1814: get_id route implementation
…ks_url BGDIINF_SB-1903: Add request.host_url and https
…t_put_endpoint BGDIINF_SB-1815: Add PUT endpoint and unittest
Also improved readme readability.
* using 3 sample files for valid, invalid and updated kmls for unit tests * added get_kml_dict in BaseRouteTestCase in base.py * renamed kml_string to kml_dict, as now a dictionary is used to store all 3 kml strings
* added some docstrings in base.py * added create_test_kml() in BaseRouteTestCase to create an initial kml via POST in s3 and DynamoDB that can be uses in unit tests, e.g. for PUT and GET requests, where it is guaranteed to already exist and hence prior POST requests are not needed any longer.
…T and DELETE endpoints
…rd alphabetically | changed name of kml file in curl sample in README.md
…l_contents in test_routes * reorganized base.py to use setUpClass and tearDownClass, so that those methods are only called once per test class and not once per test * moved helper functions formerly decorated as classfunction outside of BaseRouteTestCase where no class context needed * added a missing check self.compare_kml_contents in test_routes.py for the GET endpoint test
…_unit_tests BGDIINF_SB-1816: add more unit tests
This implement the new kml spec based on geoadmin/doc-api-spec - POST api/kml/admin multipart/form-data kml=<kml-file> - GET api/kml/admin/<kml_id> - PUT api/kml/admin/<kml_id> mutlipart/form-data admin_id=<admin_id> kml=<kml-file> - DEL api/kml/admin/<kml_id> multipart/form-data admin_id=<admin_id>
Now the S3 file returns the correct content-type
BGDIINF_SB-1971: Addaptation to new spec from doc-api-spec
In order to simplify the development of the web-mapviewer, made the origin header configurable, this way on DEV staging it can allow localhost.
BGDIINF_SB-1971: Added GET KML metadata by admin_id endpoint
Now in the POST request you can specify the KML author. This will allow to differentiates KMLs created by user (map viewer) to the one created by E2E tests.
BGDIINF_SB-1971: Added KML author in POST request
Disabling the cache for KML file will avoid issue when modifying shared kml drawing. The cache control can/could also be changed via environment variable if needed.
…ntrol BGDIINF_SB-1971: Disable caching for KML File on S3
…secure scheme header The path prefix is now set by the deployment using the WSGI SCRIPT_NAME environment variable. Also configure gunicorn to use secure scheme header which allow us to get rid of the middleware. This settings is needed in order to set the correct http proto in generated urls in responses. Change the default ALLOWED_ORIGIN to allow everything.
Use `SCRIPT_NAME` instead of route prefix & configure gunicorn for secure scheme header
IsabelleBzr
approved these changes
Nov 3, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.