test(cloudformation): await autoscaling stack lifecycle (#6260)

Signed-off-by: Andre Kurait <akurait@amazon.com>
This commit is contained in:
Andre Kurait authored and GitHub committed 2026-10-22 16:08:13 -04:00
1 parent 34f592f7e7
commit 6b7566bf05
1 file changed
+8
@@ -1,5 +1,6 @@
package io.github.hectorvent.floci.services.cloudformation;
import io.github.hectorvent.floci.testing.CfnStackWaits;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.config.EncoderConfig;
@@ -9,6 +10,7 @@ import org.junit.jupiter.api.Test;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.not;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* End-to-end check that CloudFormation provisions Application Auto Scaling for real rather than
@@ -80,6 +82,8 @@ class CloudFormationApplicationAutoScalingIntegrationTest {
.then()
.statusCode(200);
assertEquals("CREATE_COMPLETE", CfnStackWaits.awaitTerminal(stackName, CFN_AUTH).status());
given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", CFN_AUTH)
@@ -164,6 +168,8 @@ class CloudFormationApplicationAutoScalingIntegrationTest {
.then()
.statusCode(200);
assertEquals("CREATE_COMPLETE", CfnStackWaits.awaitTerminal(stackName, CFN_AUTH).status());
given()
.contentType("application/x-www-form-urlencoded")
.header("Authorization", CFN_AUTH)
@@ -174,6 +180,8 @@ class CloudFormationApplicationAutoScalingIntegrationTest {
.then()
.statusCode(200);
CfnStackWaits.awaitStackDeleted(stackName, CFN_AUTH);
given()
.config(RestAssured.config().encoderConfig(EncoderConfig.encoderConfig()
.encodeContentTypeAs("application/x-amz-json-1.1", ContentType.TEXT)))