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

Failing test? #242

Open
NoahTheDuke opened this issue Sep 10, 2023 · 3 comments
Open

Failing test? #242

NoahTheDuke opened this issue Sep 10, 2023 · 3 comments
Labels
question Further information is requested test

Comments

@NoahTheDuke
Copy link

NoahTheDuke commented Sep 10, 2023

When I run the tests locally, I see a failure at the line below. The tests pass if I add :region "us-east-1" to the client map. I am not super familiar with the library, so my apologies if this is due to dev misconfiguration.

(let [client (aws/client {:api :s3})

@scottbale
Copy link
Collaborator

Hi @NoahTheDuke

Super-short answer: for me, the default region is picked up from my ~/.aws/config file, which has a line indicating the default region.

Slightly longer answer: if a :region is not explicitly passed to the aws client function, then as the docstring indicates the region will be gotten from the default region provider. Which is a chained provider, and the "profile region provider" (third in the chain) will look for a default region in your AWS configuration profile file (~/.aws/config by default).

@scottbale scottbale added the question Further information is requested label Oct 12, 2023
@NoahTheDuke
Copy link
Author

NoahTheDuke commented Oct 12, 2023

Thanks for the explanation. Should the tests pass that so they aren't reliant on external configuration?

@scottbale
Copy link
Collaborator

@NoahTheDuke I see your point, I'll reopen the issue. Yes ideally api-test unit test shouldn't pass or fail based on an external thing like the default region provider, which depends on the user's environment. And then maybe we're missing a test that fails if the default region provider fails to find a region - that would better alert the user to what the problem is.

@scottbale scottbale reopened this Oct 31, 2023
@scottbale scottbale added the test label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested test
Projects
None yet
Development

No branches or pull requests

2 participants