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

Configured endpoint url resolver functional tests #2964

Conversation

kdaily
Copy link
Member

@kdaily kdaily commented Jun 5, 2023

Add functional testing for use of a configured endpoint url through the shared config file and environment variables.

First, the tests use a data file to load tests that enumerate the combinatorial ways that the endpoint URL can be defined (shared configuration file and environment variable for individual service and global/all services), and asserts that the correct endpoint is returned.

The tests also assert that the correct config section name and environment variable name are used to configure and override the endpoint URL for all services.

Lastly, the tests check that a operations for a subset of services use the endpoint override in a request.

@codecov-commenter
Copy link

codecov-commenter commented Jun 5, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (d0969d4) 93.32% compared to head (36a5f7a) 93.32%.

❗ Current head 36a5f7a differs from pull request most recent head 60af11c. Consider uploading reports for the commit 60af11c to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@                    Coverage Diff                    @@
##           configured-endpoint-urls    #2964   +/-   ##
=========================================================
  Coverage                     93.32%   93.32%           
=========================================================
  Files                            64       64           
  Lines                         13662    13662           
=========================================================
  Hits                          12750    12750           
  Misses                          912      912           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

botocore/utils.py Outdated Show resolved Hide resolved
tests/unit/cfg/aws_services_config Outdated Show resolved Hide resolved
botocore/configprovider.py Outdated Show resolved Hide resolved
botocore/utils.py Outdated Show resolved Hide resolved
@kdaily kdaily marked this pull request as draft June 12, 2023 20:37
@kdaily kdaily force-pushed the configured-endpoint-url-resolver-functional-tests branch 2 times, most recently from abfd5fa to b7c529a Compare June 15, 2023 17:44
@kdaily kdaily marked this pull request as ready for review June 15, 2023 17:53
@kdaily kdaily force-pushed the configured-endpoint-url-resolver-functional-tests branch 2 times, most recently from 6b8dba5 to d4e3f56 Compare June 15, 2023 18:31
@kdaily kdaily requested a review from kyleknap June 15, 2023 22:16
Copy link
Contributor

@kyleknap kyleknap left a comment

Choose a reason for hiding this comment

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

Looks like a good start. For this initial pass, I focused on seeing how we can trim the tests down to make it easier to walk through. In the next pass, we can focus more on the details on what cases we are testing

tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
@kdaily kdaily force-pushed the configured-endpoint-url-resolver-functional-tests branch 3 times, most recently from f93f7f9 to 966998f Compare June 16, 2023 22:44
@kdaily kdaily requested a review from kyleknap June 16, 2023 22:46
Copy link
Contributor

@kyleknap kyleknap left a comment

Choose a reason for hiding this comment

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

It's looking better. I just had some more comments related to cases we are testing and structuring the tests.

tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
tests/functional/test_configured_endpoint_url.py Outdated Show resolved Hide resolved
Copy link
Contributor

@kyleknap kyleknap left a comment

Choose a reason for hiding this comment

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

Cool this looks good assuming CI passes. 🚢 Let's also make sure to squash this before merging it.

@kdaily kdaily force-pushed the configured-endpoint-url-resolver-functional-tests branch from 36a5f7a to 60af11c Compare June 20, 2023 03:47
The tests use a data file to load tests that enumerate the ways that the
endpoint URL can be defined and asserts that the correct endpoint is
used in a request and that it is ignored correctly if the appropriate
shared config file property or environment variable is supplied.

They also assert that the correct config section name and environment
variable name are used to configure and override the endpoint URL for
every AWS service.
@kdaily kdaily force-pushed the configured-endpoint-url-resolver-functional-tests branch from 60af11c to d9a7dd9 Compare June 20, 2023 04:06
@kdaily kdaily merged commit ce89896 into boto:configured-endpoint-urls Jun 20, 2023
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