-
Notifications
You must be signed in to change notification settings - Fork 0
Add an initial draft for test utilities #11
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
Conversation
from localstack.sdk.testing import cloudpods | ||
|
||
DECORATOR_POD_NAME = "ls-sdk-pod-decorator" | ||
QUEUE_NAME = "ls-decorator-queue" |
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.
It may be a good idea to use names with a random element, or perhaps handle exceptions in fixture teardowns
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.
My idea was to simply keep pushing on the same pod which simply creates a new version. This way we don't have to think about randomness or exceptions.
Co-authored-by: Viren Nadkarni <[email protected]>
Co-authored-by: Viren Nadkarni <[email protected]>
This PR adds some initial test utilities (fixtures and decorators) to the Python SDK.
In particular, two utilities have been added.
A
@cloudpods
decorator that can be used as follows:A cloud pod with a given name is loaded before the test runs and the state of the container is reset at the end of the test execution.
A
reset_state
fixture that simply resets the state of the container after test execution.