#9907 test: Consolidate AWS environment clean-up for tests mocking S3
Pull request opened by
edgarrmondragon
Description
Checklist
• I have read the
contribution guide
Was generative AI tooling used to co-author this PR?
• Yes (please specify the tool below)
Related Issues
• Closes #XXXX
Summary by Sourcery
Unify and centralize AWS-related environment cleanup across S3-backed state tests to ensure consistent, isolated behavior when mocking S3, and tighten test expectations and comments around S3 state migration and upgrade flows.
Enhancements:
• Clarify test comments and expected behavior for S3 state backend migration, including simplifying wording and removing obsolete explanatory text.
Tests:
• Introduce autouse fixtures in S3 state store and S3 state backend test classes to consistently clear AWS_DEFAULT_REGION and AWS_PROFILE before each test.
• Refactor S3-related tests to rely on shared environment-cleanup fixtures instead of per-test monkeypatching, reducing duplication and improving isolation.
• Update the CLI upgrade state test to explicitly clear AWS-related environment variables before interacting with mocked S3.
meltano/meltano