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

test: Add integration tests for running remote invoke on kinesis service #6072

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

hnnasit
Copy link
Contributor

@hnnasit hnnasit commented Oct 11, 2023

Which issue(s) does this change fix?

N/A

Why is this change necessary?

This PR adds integration tests for sam remote invoke for Kinesis service. The tests have been disables until the support for the service is available.

How does it address the issue?

Tests run locally:

tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_asynchronous_using_boto_parameter@sam_remote_invoke_single_lambda_resource 
tests/integration/remote/invoke/test_remote_invoke.py::TestSFNPriorityInvoke::test_invoke_boto_parameters@sam_remote_invoke_sfn_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_boto_parameters@sam_remote_invoke_kinesis_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_boto_parameters@sam_remote_invoke_sqs_resource_priority 
[gw1] [  1%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSFNPriorityInvoke::test_invoke_boto_parameters@sam_remote_invoke_sfn_resource_priority 
[gw2] [  3%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_boto_parameters@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_empty_event_provided@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSFNPriorityInvoke::test_invoke_empty_event_provided@sam_remote_invoke_sfn_resource_priority 
[gw1] [  5%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSFNPriorityInvoke::test_invoke_empty_event_provided@sam_remote_invoke_sfn_resource_priority 
[gw2] [  7%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_empty_event_provided@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_with_event_file_provided@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSFNPriorityInvoke::test_invoke_with_event_file_provided@sam_remote_invoke_sfn_resource_priority 
[gw1] [  9%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSFNPriorityInvoke::test_invoke_with_event_file_provided@sam_remote_invoke_sfn_resource_priority 
[gw2] [ 11%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_with_event_file_provided@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSFNPriorityInvoke::test_invoke_with_event_provided_0__is_developer_false_@sam_remote_invoke_sfn_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_with_event_provided_0__foo_bar_@sam_remote_invoke_sqs_resource_priority 
[gw1] [ 13%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSFNPriorityInvoke::test_invoke_with_event_provided_0__is_developer_false_@sam_remote_invoke_sfn_resource_priority 
[gw2] [ 15%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_with_event_provided_0__foo_bar_@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_with_event_provided_1_Hello_World@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSFNPriorityInvoke::test_invoke_with_event_provided_1__is_developer_true_@sam_remote_invoke_sfn_resource_priority 
[gw1] [ 17%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSFNPriorityInvoke::test_invoke_with_event_provided_1__is_developer_true_@sam_remote_invoke_sfn_resource_priority 
[gw2] [ 19%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_with_event_provided_1_Hello_World@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_with_event_provided_2__heading_Reminder_heading_@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_empty_event_provided@sam_remote_invoke_multiple_resources 
[gw2] [ 21%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_with_event_provided_2__heading_Reminder_heading_@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_with_physical_id_provided_as_resource_id@sam_remote_invoke_sqs_resource_priority 
[gw2] [ 23%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestSQSPriorityInvoke::test_invoke_with_physical_id_provided_as_resource_id@sam_remote_invoke_sqs_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestNestedTemplateResourcesInvoke::test_invoke_empty_event_provided_0_ChildStack_HelloWorldFunction@sam_remote_invoke_nested_resources 
[gw3] [ 25%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_boto_parameters@sam_remote_invoke_kinesis_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_empty_event_provided@sam_remote_invoke_kinesis_resource_priority 
[gw3] [ 26%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_empty_event_provided@sam_remote_invoke_kinesis_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_with_event_file_provided@sam_remote_invoke_kinesis_resource_priority 
[gw3] [ 28%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_with_event_file_provided@sam_remote_invoke_kinesis_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_with_event_provided_0__foo_bar_@sam_remote_invoke_kinesis_resource_priority 
[gw3] [ 30%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_with_event_provided_0__foo_bar_@sam_remote_invoke_kinesis_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_with_event_provided_1__Hello_World_@sam_remote_invoke_kinesis_resource_priority 
[gw3] [ 32%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_with_event_provided_1__Hello_World_@sam_remote_invoke_kinesis_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_with_event_provided_2__hello_world_foo_1_bar_@sam_remote_invoke_kinesis_resource_priority 
[gw3] [ 34%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_with_event_provided_2__hello_world_foo_1_bar_@sam_remote_invoke_kinesis_resource_priority 
tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_with_physical_id_provided_as_resource_id@sam_remote_invoke_kinesis_resource_priority 
[gw0] [ 36%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_asynchronous_using_boto_parameter@sam_remote_invoke_single_lambda_resource 
tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_dryrun_using_boto_parameter@sam_remote_invoke_single_lambda_resource 
[gw3] [ 38%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestKinesisPriorityInvoke::test_invoke_with_physical_id_provided_as_resource_id@sam_remote_invoke_kinesis_resource_priority 
[gw0] [ 40%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_dryrun_using_boto_parameter@sam_remote_invoke_single_lambda_resource 
tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_empty_event_provided@sam_remote_invoke_single_lambda_resource 
[gw0] [ 42%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_empty_event_provided@sam_remote_invoke_single_lambda_resource 
tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_response_json_output_format@sam_remote_invoke_single_lambda_resource 
[gw0] [ 44%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_response_json_output_format@sam_remote_invoke_single_lambda_resource 
tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_with_event_file_provided@sam_remote_invoke_single_lambda_resource 
[gw2] [ 46%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestNestedTemplateResourcesInvoke::test_invoke_empty_event_provided_0_ChildStack_HelloWorldFunction@sam_remote_invoke_nested_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestNestedTemplateResourcesInvoke::test_invoke_empty_event_provided_1_ChildStack_HelloWorldStateMachine@sam_remote_invoke_nested_resources 
[gw2] [ 48%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestNestedTemplateResourcesInvoke::test_invoke_empty_event_provided_1_ChildStack_HelloWorldStateMachine@sam_remote_invoke_nested_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestNestedTemplateResourcesInvoke::test_invoke_event_file_provided@sam_remote_invoke_nested_resources 
[gw0] [ 50%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_with_event_file_provided@sam_remote_invoke_single_lambda_resource 
tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_with_event_provided@sam_remote_invoke_single_lambda_resource 
[gw2] [ 51%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestNestedTemplateResourcesInvoke::test_invoke_event_file_provided@sam_remote_invoke_nested_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestNestedTemplateResourcesInvoke::test_invoke_with_event_provided_0_ChildStack_HelloWorldFunction@sam_remote_invoke_nested_resources 
[gw0] [ 53%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_with_event_provided@sam_remote_invoke_single_lambda_resource 
tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_with_resource_id_provided_as_arn@sam_remote_invoke_single_lambda_resource 
[gw2] [ 55%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestNestedTemplateResourcesInvoke::test_invoke_with_event_provided_0_ChildStack_HelloWorldFunction@sam_remote_invoke_nested_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestNestedTemplateResourcesInvoke::test_invoke_with_event_provided_1_ChildStack_HelloWorldStateMachine@sam_remote_invoke_nested_resources 
[gw2] [ 57%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestNestedTemplateResourcesInvoke::test_invoke_with_event_provided_1_ChildStack_HelloWorldStateMachine@sam_remote_invoke_nested_resources 
[gw0] [ 59%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_with_resource_id_provided_as_arn@sam_remote_invoke_single_lambda_resource 
[gw1] [ 61%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_empty_event_provided@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_with_only_event_provided_0_HelloWorldServerlessFunction@sam_remote_invoke_multiple_resources 
[gw1] [ 63%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_with_only_event_provided_0_HelloWorldServerlessFunction@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_with_only_event_provided_1_EchoCustomEnvVarFunction@sam_remote_invoke_multiple_resources 
[gw1] [ 65%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_with_only_event_provided_1_EchoCustomEnvVarFunction@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_with_only_event_provided_2_EchoEventFunction@sam_remote_invoke_multiple_resources 
[gw1] [ 67%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_with_only_event_provided_2_EchoEventFunction@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_with_only_event_provided_3_StockPriceGuideStateMachine@sam_remote_invoke_multiple_resources 
[gw1] [ 69%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_with_only_event_provided_3_StockPriceGuideStateMachine@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_with_only_event_provided_4_StockPriceGuideStateMachine@sam_remote_invoke_multiple_resources 
[gw1] [ 71%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_invoke_with_only_event_provided_4_StockPriceGuideStateMachine@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_kinesis_invoke_with_boto_parameters@sam_remote_invoke_multiple_resources 
[gw1] [ 73%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_kinesis_invoke_with_boto_parameters@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_kinesis_invoke_with_resource_id_and_stack_name@sam_remote_invoke_multiple_resources 
[gw1] [ 75%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_kinesis_invoke_with_resource_id_and_stack_name@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_kinesis_invoke_with_resource_id_provided_as_arn@sam_remote_invoke_multiple_resources 
[gw1] [ 76%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_kinesis_invoke_with_resource_id_provided_as_arn@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_invoke_client_context_boto_parameter@sam_remote_invoke_multiple_resources 
[gw1] [ 78%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_invoke_client_context_boto_parameter@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_invoke_with_resource_id_provided_as_arn_0_HelloWorldServerlessFunction@sam_remote_invoke_multiple_resources 
[gw1] [ 80%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_invoke_with_resource_id_provided_as_arn_0_HelloWorldServerlessFunction@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_invoke_with_resource_id_provided_as_arn_1_EchoCustomEnvVarFunction@sam_remote_invoke_multiple_resources 
[gw1] [ 82%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_invoke_with_resource_id_provided_as_arn_1_EchoCustomEnvVarFunction@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_invoke_with_resource_id_provided_as_arn_2_EchoEventFunction@sam_remote_invoke_multiple_resources 
[gw1] [ 84%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_invoke_with_resource_id_provided_as_arn_2_EchoEventFunction@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_raises_exception_invoke@sam_remote_invoke_multiple_resources 
[gw1] [ 86%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_raises_exception_invoke@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_writes_to_stderr_invoke@sam_remote_invoke_multiple_resources 
[gw1] [ 88%] PASSED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_lambda_writes_to_stderr_invoke@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sfn_invoke_boto_parameters@sam_remote_invoke_multiple_resources 
[gw1] [ 90%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sfn_invoke_boto_parameters@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sfn_invoke_execution_fails@sam_remote_invoke_multiple_resources 
[gw1] [ 92%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sfn_invoke_execution_fails@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sfn_invoke_with_resource_id_provided_as_arn@sam_remote_invoke_multiple_resources 
[gw1] [ 94%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sfn_invoke_with_resource_id_provided_as_arn@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sqs_invoke_boto_parameters_fifo_queue@sam_remote_invoke_multiple_resources 
[gw1] [ 96%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sqs_invoke_boto_parameters_fifo_queue@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sqs_invoke_with_resource_id_and_stack_name@sam_remote_invoke_multiple_resources 
[gw1] [ 98%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sqs_invoke_with_resource_id_and_stack_name@sam_remote_invoke_multiple_resources 
tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sqs_invoke_with_resource_id_provided_as_arn@sam_remote_invoke_multiple_resources 
[gw1] [100%] SKIPPED tests/integration/remote/invoke/test_remote_invoke.py::TestMultipleResourcesInvoke::test_sqs_invoke_with_resource_id_provided_as_arn@sam_remote_invoke_multiple_resources
================================= 30 passed, 22 skipped, 5 warnings in 118.63s (0:01:58) =================================

What side effects does this change have?

No side effects

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hnnasit hnnasit requested a review from a team as a code owner October 11, 2023 23:43
@hnnasit hnnasit requested review from sriram-mv and hawflau October 11, 2023 23:43
@hnnasit hnnasit enabled auto-merge October 12, 2023 21:47
@hnnasit hnnasit added this pull request to the merge queue Oct 12, 2023
Merged via the queue into aws:develop with commit ad9cf6f Oct 12, 2023
76 checks passed
moelasmar pushed a commit to moelasmar/aws-sam-cli that referenced this pull request Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants