Skip to content

Commit da81ee2

Browse files
authored
Adding e2e tests for ScalingConfig (#76)
Description of changes: Adding e2e tests for ScalingConfig By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent a5fa961 commit da81ee2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

apis/v1alpha1/ack-generate-metadata.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ack_generate_info:
2-
build_date: "2023-01-31T23:16:05Z"
3-
build_hash: c3fefc1cc5cb030c5e893027ba1195d747889aca
2+
build_date: "2023-02-01T00:38:06Z"
3+
build_hash: 12246c7da82841b351ec7a9e1f139f9338f2784b
44
go_version: go1.19
55
version: v0.23.0
66
api_directory_checksum: a9fcef68210dd72b4b2e37052f2c1a9e971326c6

test/e2e/tests/test_event_source_mapping.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def lambda_function():
4444
replacements["BUCKET_NAME"] = resources.FunctionsBucket.name
4545
replacements["LAMBDA_ROLE"] = resources.ESMRole.arn
4646
replacements["LAMBDA_FILE_NAME"] = LAMBDA_FUNCTION_FILE_ZIP
47-
replacements["RESERVED_CONCURRENT_EXECUTIONS"] = "0"
47+
replacements["RESERVED_CONCURRENT_EXECUTIONS"] = "10"
4848
replacements["CODE_SIGNING_CONFIG_ARN"] = ""
4949
replacements["AWS_REGION"] = get_region()
5050

@@ -128,6 +128,7 @@ def test_smoke_sqs_queue_stream(self, lambda_client, lambda_function):
128128
},
129129
]
130130
}
131+
cr["spec"]["scalingConfig"] = {"maximumConcurrency": 4}
131132

132133
# Patch k8s resource
133134
k8s.patch_custom_resource(ref, cr)
@@ -142,6 +143,8 @@ def test_smoke_sqs_queue_stream(self, lambda_client, lambda_function):
142143
"Pattern": "{\"controller-version\":[\"v1\"]}"
143144
},
144145
]
146+
assert esm["ScalingConfig"]["MaximumConcurrency"] == 4
147+
145148

146149
# Delete the filterCriteria field
147150
cr = k8s.wait_resource_consumed_by_controller(ref)

0 commit comments

Comments
 (0)