feat(lambda): add support for UpdateFunctionConfiguration AWS API (#472)

This commit is contained in:
edwintian authored and GitHub committed 2026-04-16 17:16:13 -05:00
1 parent 9a9be34cba
commit 5f07c77237
3 files changed
+111 -2

No files matched your search

@@ -167,6 +167,53 @@ class LambdaIntegrationTest {
@Test
@Order(10)
void updateFunctionConfiguration() {
given()
.contentType("application/json")
.body("""
{
"Timeout": 60,
"MemorySize": 512,
"Description": "Updated description",
"Environment": {
"Variables": {
"MY_KEY": "my-value",
"ANOTHER_KEY": "another-value"
}
}
}
""")
.when()
.put(BASE_PATH + "/functions/hello-world/configuration")
.then()
.statusCode(200)
.body("FunctionName", equalTo("hello-world"))
.body("Timeout", equalTo(60))
.body("MemorySize", equalTo(512))
.body("Description", equalTo("Updated description"))
.body("Environment.Variables.MY_KEY", equalTo("my-value"))
.body("Environment.Variables.ANOTHER_KEY", equalTo("another-value"))
.body("RevisionId", notNullValue());
}
@Test
@Order(11)
void updateFunctionConfiguration_notFound_returns404() {
given()
.contentType("application/json")
.body("""
{
"Timeout": 30
}
""")
.when()
.put(BASE_PATH + "/functions/nonexistent-function/configuration")
.then()
.statusCode(404);
}
@Test
@Order(12)
void deleteFunction() {
given()
.when()
@@ -176,7 +223,7 @@ class LambdaIntegrationTest {
}
@Test
@Order(11)
@Order(13)
void deletedFunctionNotFound() {
given()
.when()
@@ -186,7 +233,7 @@ class LambdaIntegrationTest {
}
@Test
@Order(12)
@Order(14)
void createFunctionWithLargeInlineZip() throws Exception {
// Build a valid zip with a handler file + 16 MB padding so the base64
// encoding exceeds Jackson's former 20 MB maxStringLength default.