Skip to content

armgit / floci

Public Imported from GitHub
0

Light, fluffy, and always free - The AWS Local Emulator alternative

fix(lambda): include LastUpdateStatus in function configuration responses (#463)

Christine Nguyen25905187b36e
diff --git a/src/main/java/io/github/hectorvent/floci/services/lambda/LambdaController.java b/src/main/java/io/github/hectorvent/floci/services/lambda/LambdaController.java
index 134ce83559..d055ec6156 100644
--- a/src/main/java/io/github/hectorvent/floci/services/lambda/LambdaController.java
+++ b/src/main/java/io/github/hectorvent/floci/services/lambda/LambdaController.java
@@ -479,6 +479,7 @@ public class LambdaController {
node.put("LastModified", String.valueOf(fn.getLastModified()));
node.put("RevisionId", fn.getRevisionId());
node.put("Version", fn.getVersion());
+ node.put("LastUpdateStatus", "Successful");
if (fn.getEnvironment() != null && !fn.getEnvironment().isEmpty()) {
ObjectNode envNode = node.putObject("Environment");
diff --git a/src/test/java/io/github/hectorvent/floci/services/lambda/LambdaIntegrationTest.java b/src/test/java/io/github/hectorvent/floci/services/lambda/LambdaIntegrationTest.java
index dbd03d83ab..f76714f388 100644
--- a/src/test/java/io/github/hectorvent/floci/services/lambda/LambdaIntegrationTest.java
+++ b/src/test/java/io/github/hectorvent/floci/services/lambda/LambdaIntegrationTest.java
@@ -152,8 +152,21 @@ class LambdaIntegrationTest {
.statusCode(400);
}
+ // ── Issue #439: LastUpdateStatus in responses ─────────────────────
+
@Test
@Order(9)
+ void getFunctionIncludesLastUpdateStatus() {
+ given()
+ .when()
+ .get(BASE_PATH + "/functions/hello-world")
+ .then()
+ .statusCode(200)
+ .body("Configuration.LastUpdateStatus", equalTo("Successful"));
+ }
+
+ @Test
+ @Order(10)
void deleteFunction() {
given()
.when()
@@ -163,7 +176,7 @@ class LambdaIntegrationTest {
}
@Test
- @Order(10)
+ @Order(11)
void deletedFunctionNotFound() {
given()
.when()
@@ -173,7 +186,7 @@ class LambdaIntegrationTest {
}
@Test
- @Order(11)
+ @Order(12)
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.