Skip to content

Conversation

@Taragolis
Copy link
Contributor

Follow up: #27823 (comment)

This PR add two changes in Amazon Provider tests

  1. Move check no cred exception from test_s3 to test_base_aws

  2. Clear AWS environment variables to mocked values

  • If developer set in files/airflow-breeze-config/variables.env or in IDE some AWS specific variables it might affect local tests execution
  • By default if credentials not set then botocore/boto3 tried to use credentials/configs from default profile from ~/.aws/config and ~/.aws/credentials as well as legacy boto configuration. For prevent this behaviour create temporary empty configurations files (on session level) and set appropriate ENV variables
  • Set fake AWS Credentials for prevent usage of actual credentials. In this case some tests might failed with An error occurred (UnrecognizedClientException) when calling the FooBar operation: The security token included in the request is invalid.

@Taragolis Taragolis requested a review from eladkal as a code owner December 5, 2022 18:56
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Dec 5, 2022
@potiuk potiuk merged commit 5b5cf2b into apache:main Dec 5, 2022
@ferruzzi
Copy link
Contributor

ferruzzi commented Dec 5, 2022

Heh. Jarek approved and merged while I was looking at it, but a posthumous LGTM :P

@Taragolis Taragolis deleted the cleanup-aws-config-before-run-tests branch January 14, 2023 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants