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

Refactor S3 Testutils (GSI-762) #115

Merged
merged 7 commits into from
Jun 28, 2024

Conversation

TheByronHimes
Copy link
Member

@TheByronHimes TheByronHimes commented Jun 27, 2024

Bumps version from 3.2.2 to 3.2.3 because the changed items were not in use by any other microservices and are low-impact. Strictly following SemVer would mean bumping the major version number to 4 because the delete_created_buckets method was deleted, and some other functions were moved into the s3 fixture instead of existing on their own (and another was deleted).

The fixtures were moved into s3/testutils/_fixures.py, the supporting functions moved into s3/testutils/_utils.py, and typical_workflow was moved into its own module in that same directory. The imports are all funneled into __init__.py to avoid disrupting consuming services.
A list of current buckets is retrieved using the object storage's s3 client. The bucket deletion process iterates through the buckets and deletes them one by one, so neither the object storage nor test fixture need to track which buckets have been created.

@TheByronHimes TheByronHimes requested a review from Cito June 27, 2024 12:44
@coveralls

This comment was marked as outdated.

Add leading underscore to s3 testutils files
@TheByronHimes TheByronHimes marked this pull request as ready for review June 27, 2024 12:53
@coveralls
Copy link

coveralls commented Jun 27, 2024

Pull Request Test Coverage Report for Build 9696869004

Details

  • 219 of 226 (96.9%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 91.936%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/hexkit/providers/s3/testutils/_fixtures.py 106 108 98.15%
src/hexkit/providers/s3/testutils/_utils.py 69 74 93.24%
Files with Coverage Reduction New Missed Lines %
src/hexkit/providers/s3/provider.py 1 79.42%
Totals Coverage Status
Change from base Build 9481767985: 0.03%
Covered Lines: 1733
Relevant Lines: 1885

💛 - Coveralls

Cito
Cito previously approved these changes Jun 28, 2024
Copy link
Member

@Cito Cito left a comment

Choose a reason for hiding this comment

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

Thanks a lot, this is pretty much what I had in mind.

Just small suggestions.

src/hexkit/providers/s3/testutils/_fixtures.py Outdated Show resolved Hide resolved
src/hexkit/providers/s3/testutils/_fixtures.py Outdated Show resolved Hide resolved
src/hexkit/providers/s3/testutils/_fixtures.py Outdated Show resolved Hide resolved
Update localstack image version to 3.5.0
@coveralls
Copy link

coveralls commented Jun 28, 2024

Pull Request Test Coverage Report for Build 9712526144

Details

  • 217 of 224 (96.88%) changed or added relevant lines in 6 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 91.928%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/hexkit/providers/s3/testutils/_fixtures.py 104 106 98.11%
src/hexkit/providers/s3/testutils/_utils.py 69 74 93.24%
Files with Coverage Reduction New Missed Lines %
src/hexkit/providers/s3/provider.py 1 79.42%
Totals Coverage Status
Change from base Build 9481767985: 0.03%
Covered Lines: 1731
Relevant Lines: 1883

💛 - Coveralls

@TheByronHimes TheByronHimes merged commit 8a31e64 into main Jun 28, 2024
8 checks passed
@TheByronHimes TheByronHimes deleted the feature/refactor_s3_testutils_GSI-762 branch June 28, 2024 12:22
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.

3 participants