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

fix tests: changed random bucket name to full lowercase #919

Merged

Conversation

simon-saliba
Copy link
Contributor

This PR updates the random bucket naming generation used in tests to match the new AWS S3 bucket naming specifications.

According to documentation [https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html],
bucket names can consist only of lowercase letters, numbers, dots (.), and hyphens (-).

S3 bucket url skeletons have also changed to take the following form:
https://bucket-name.s3.Region.amazonaws.com/key-name
according to source [https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html]

These couple of changes have been making a number of unit tests in test_basic_s3.py failing with error: InvalidBucketName, and NoSuckBucket.

Description of Change

Change required to make all unit tests under test_basic_s3.py pass.
Changes include:

  • making random S3 bucket names used in tests only lowercase
  • changing the url for S3 buckets

Assumptions

Replace this text with any assumptions made (if any)

Checklist for All Submissions

  • I have added change info to CHANGES.rst
  • If this is resolving an issue (needed so future developers can determine if change is still necessary and under what conditions) (can be provided via link to issue with these details):
    • Detailed description of issue
    • Alternative methods considered (if any)
    • How issue is being resolved
    • How issue can be reproduced
  • If this is providing a new feature (can be provided via link to issue with these details):
    • Detailed description of new feature
    • Why needed
    • Alternatives methods considered (if any)

Checklist when updating botocore and/or aiohttp versions

  • I have read and followed CONTRIBUTING.rst
  • I have updated test_patches.py where/if appropriate (also check if no changes necessary)
  • I have ensured that the awscli/boto3 versions match the updated botocore version

@codecov
Copy link

codecov bot commented Mar 2, 2022

Codecov Report

Merging #919 (c46e518) into master (0b71254) will decrease coverage by 1.56%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #919      +/-   ##
==========================================
- Coverage   89.27%   87.70%   -1.57%     
==========================================
  Files          42       45       +3     
  Lines        4576     4848     +272     
==========================================
+ Hits         4085     4252     +167     
- Misses        491      596     +105     
Flag Coverage Δ
unittests 87.70% <100.00%> (-1.57%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tests/conftest.py 91.72% <ø> (+0.40%) ⬆️
tests/test_basic_s3.py 85.99% <100.00%> (+0.70%) ⬆️
aiobotocore/retries/adaptive.py 83.72% <0.00%> (ø)
aiobotocore/retries/bucket.py 66.66% <0.00%> (ø)
tests/test_adaptive.py 36.13% <0.00%> (ø)
tests/test_patches.py 96.07% <0.00%> (+0.16%) ⬆️
aiobotocore/client.py 84.90% <0.00%> (+1.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b71254...c46e518. Read the comment docs.

@thehesiod thehesiod self-requested a review March 2, 2022 17:49
@thehesiod thehesiod merged commit 833694a into aio-libs:master Mar 2, 2022
@thehesiod
Copy link
Collaborator

@simon-saliba thank you!

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.

2 participants