Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private static java.util.Optional<LocalStackServiceCapability> mapServiceName(St
}
return switch (service.toLowerCase(Locale.ROOT)) {
case "ecs" -> java.util.Optional.of(LocalStackServiceCapability.ECS);
case "elbv2", "elb", "elasticloadbalancingv2" ->
case "elbv2", "elb", "elasticloadbalancingv2", "elasticloadbalancing" ->
java.util.Optional.of(LocalStackServiceCapability.ELBV2);
case "ec2" -> java.util.Optional.of(LocalStackServiceCapability.EC2);
case "autoscaling", "application-autoscaling" ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,19 @@ void parsesHealthServicesIntoCapabilities() throws Exception {
assertTrue(caps.contains(LocalStackServiceCapability.EFS));
assertTrue(caps.contains(LocalStackServiceCapability.BACKUP));
}

/** LocalStack's own {@code /_localstack/health} reports ELBv2/ALB support under the key
* {@code elasticloadbalancing} (its real AWS service name), not {@code elbv2} — mapping only
* the latter meant every deploy needing an ALB was blocked as "missing capability" even
* though LocalStack reported it as available. */
@Test
void mapsElasticLoadBalancingHealthKeyToElbv2Capability() {
ObjectNode root = new ObjectMapper().createObjectNode();
ObjectNode services = root.putObject("services");
services.put("ecs", "available");
services.put("elasticloadbalancing", "available");

var caps = LocalStackCapabilityProbe.capabilitiesFromHealth(root, new LinkedHashMap<>());
assertTrue(caps.contains(LocalStackServiceCapability.ELBV2));
}
}
Loading