Page MenuHomeElementl

Ensure AWS unit tests never run against real AWS
ClosedPublic

Authored by jordansanders on Jun 18 2021, 7:46 PM.
Tags
None
Referenced Files
F2988806: D8473.diff
Mon, Jun 5, 3:07 AM
Unknown Object (File)
Fri, May 19, 3:04 PM
Unknown Object (File)
Mar 18 2023, 6:50 AM
Unknown Object (File)
Mar 18 2023, 12:18 AM
Unknown Object (File)
Mar 17 2023, 11:14 PM
Unknown Object (File)
Mar 17 2023, 10:59 PM
Unknown Object (File)
Mar 15 2023, 9:33 AM
Unknown Object (File)
Mar 2 2023, 10:51 PM
Subscribers
None

Details

Summary

Patch os.environ on every test in the suite with AWS_ACCESS_KEY_ID=test
and AWS_SECRET_ACCESS_KEY=test to make sure we never accidentally run
against real AWS credentials in unit tests.

This is in line with the recommendations from moto:

https://github.com/spulec/moto#how-do-i-avoid-tests-from-mutating-my-real-infrastructure

Test Plan

unit

Diff Detail

Repository
R1 dagster
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

no HBO max issues for us

We don't have any end-to-end tests that connect to a real AWS instance? or are all those in integration_tests

This revision is now accepted and ready to land.Jun 18 2021, 9:53 PM

We don't have any end-to-end tests that connect to a real AWS instance? or are all those in integration_tests

Not in this test suite at least. As a matter of principle, I think they _should_ go in integration tests though (and it looks like that's probably already the case).

This revision was landed with ongoing or failed builds.Jun 21 2021, 10:03 PM
This revision was automatically updated to reflect the committed changes.