Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 488
chore(ci): add the Idempotency feature to nox tests#4585
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
Merged
leandrodamascena
merged 1 commit into
aws-powertools:develop
from
leandrodamascena:feat/ci-idempotencyJun 20, 2024
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -110,6 +110,7 @@ def test_with_boto3_sdk_as_required_package(session: nox.Session): | ||
| f"{PREFIX_TESTS_FUNCTIONAL}/feature_flags/_boto3/", | ||
| f"{PREFIX_TESTS_UNIT}/data_classes/_boto3/", | ||
| f"{PREFIX_TESTS_FUNCTIONAL}/streaming/_boto3/", | ||
| f"{PREFIX_TESTS_FUNCTIONAL}/idempotency/_boto3/", | ||
| ], | ||
| extras="aws-sdk", | ||
| ) | ||
| @@ -158,3 +159,37 @@ def test_with_pydantic_required_package(session: nox.Session, pydantic: str): | ||
| f"{PREFIX_TESTS_UNIT}/parser/_pydantic/", | ||
| ], | ||
| ) | ||
| @nox.session() | ||
| @nox.parametrize("pydantic", ["1.10", "2.0"]) | ||
| def test_with_boto3_and_pydantic_required_package(session: nox.Session, pydantic: str): | ||
| """Tests that only depends for Boto3 + Pydantic library v1 and v2""" | ||
| # Idempotency with custom serializer | ||
| session.install(f"pydantic>={pydantic}") | ||
| build_and_run_test( | ||
| session, | ||
| folders=[ | ||
| f"{PREFIX_TESTS_FUNCTIONAL}/idempotency/_pydantic/", | ||
| ], | ||
| extras="aws-sdk", | ||
| ) | ||
| @nox.session() | ||
| def test_with_redis_and_boto3_sdk_as_required_package(session: nox.Session): | ||
heitorlessa marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| """Tests that depends on Redis library""" | ||
| # Idempotency - Redis backend | ||
| # Our Redis tests requires multiprocess library to simulate Race Condition | ||
| session.run("pip", "install", "multiprocess") | ||
| build_and_run_test( | ||
| session, | ||
| folders=[ | ||
| f"{PREFIX_TESTS_FUNCTIONAL}/idempotency/_redis/", | ||
| ], | ||
| extras="redis,aws-sdk", | ||
| ) | ||
Empty file.
File renamed without changes.
179 changes: 1 addition & 178 deletions
179 ...unctional/idempotency/test_idempotency.py → ...al/idempotency/_boto3/test_idempotency.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to install pydantic + boto3 because we export the
DynamoDBPersistenceLayerat top level and it requires boto3.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you meant you only needed boto3 when using
DynamoDBPersistenceLayer, whereas for this test you also need pydantic because it'll use serializers and models.