-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
test: Step functions remote invoke integ tests #5502
Conversation
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.
LGTM in general, left couple of questions to see if we can automate test skipping.
# Skip remote invoke Step function integration tests | ||
# ("ChildStack/HelloWorldStateMachine", '{"key1": "Hello", "key2": "world"}', "World"), |
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.
Just thinking out loud, can we use the dictionary we use in factory implementation to decide whether certain test group should be run or skipped? In that sense we don't need to track to uncomment these lines.
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.
Good point, let me think about changing it to a skipIf
so that it's easier to maintain.
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.
Addressed this in the new commit, used the factory dict so that only that needs to be updated when new resources support is added.
@@ -58,6 +58,8 @@ def create_resources_and_boto_clients(cls): | |||
} | |||
cls.cfn_client = get_boto_client_provider_with_config()("cloudformation") | |||
cls.lambda_client = get_boto_client_provider_with_config()("lambda") | |||
cls.stepfunctions_client = get_boto_client_provider_with_config()("stepfunctions") | |||
cls.xray_client = get_boto_client_provider_with_config()("xray") |
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.
why do we need to call get_boto_client_provider_with_config()
5 times?
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.
Good callout, can create a variable and create a single call.
Co-authored-by: Wing Fung Lau <[email protected]>
'{"key1": "Hello", "key2": "serverless", "key3": "world"}', | ||
{"key1": "Hello", "key2": "serverless", "key3": "world"}, | ||
), | ||
# Skip remote invoke Step function integration tests |
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.
is this not needed or will it be un-commented in the future?
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.
This will be un-commented once step functions is supported for remote invoke
. Trying to think of a way to not have to comment them and skip them based on the resource-type.
Why is this change necessary?
This PR adds integration tests for step functions for the
remote invoke
command. The tests are skipped for now as the resource is not supported yet.TestSFNPriorityInvoke
contains a single Step function for testingremote invoke
commands when theresource_id
is not provided and the resource is invoked by default.TestMultipleResourcesInvoke
andTestNestedTemplateResourcesInvoke
with different combinations of commands and resources.What side effects does this change have?
N/A
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make pr
passesmake update-reproducible-reqs
if dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.