diff --git a/src/test/java/io/floci/aws/services/ecs/EcsLeftoverContainersDockerIntegrationTest.java b/src/test/java/io/floci/aws/services/ecs/EcsLeftoverContainersDockerIntegrationTest.java index c762eac2ff..fa7edf42f5 100644 --- a/src/test/java/io/floci/aws/services/ecs/EcsLeftoverContainersDockerIntegrationTest.java +++ b/src/test/java/io/floci/aws/services/ecs/EcsLeftoverContainersDockerIntegrationTest.java @@ -12,6 +12,7 @@ import io.floci.aws.services.ecs.model.LaunchType; import io.floci.aws.services.ecs.model.NetworkMode; import io.floci.aws.services.ecs.model.TaskDefinition; import io.floci.aws.testing.TestImages; +import io.floci.aws.testing.ValidateSignaturesProfile; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.TestProfile; import jakarta.inject.Inject; @@ -39,7 +40,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; * and tells this run's containers from a previous run's by the run label rather than by time. */ @QuarkusTest -@TestProfile(EcsServiceDiscoveryDockerIntegrationTest.DockerEcsProfile.class) +@TestProfile(ValidateSignaturesProfile.class) class EcsLeftoverContainersDockerIntegrationTest { private static final String REGION = "us-east-1"; diff --git a/src/test/java/io/floci/aws/services/ecs/EcsServiceDiscoveryDockerIntegrationTest.java b/src/test/java/io/floci/aws/services/ecs/EcsServiceDiscoveryDockerIntegrationTest.java index 298f3c937a..b743d7903e 100644 --- a/src/test/java/io/floci/aws/services/ecs/EcsServiceDiscoveryDockerIntegrationTest.java +++ b/src/test/java/io/floci/aws/services/ecs/EcsServiceDiscoveryDockerIntegrationTest.java @@ -15,8 +15,8 @@ import io.floci.aws.services.ecs.model.NetworkMode; import io.floci.aws.services.ecs.model.TaskDefinition; import io.floci.aws.services.ecs.model.UpdateServiceRequest; import io.floci.aws.testing.TestImages; +import io.floci.aws.testing.ValidateSignaturesProfile; import io.quarkus.test.junit.QuarkusTest; -import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; import jakarta.inject.Inject; import org.junit.jupiter.api.Assumptions; @@ -39,9 +39,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue; *
Nothing here touches the registrar. A service that declares {@code serviceRegistries} has a * real container launched for it, and the assertions are that the Cloud Map name resolves to the * task's address while it runs and stops resolving once the task does. + * + *
ECS runs unmocked here, and security-group enforcement goes back to its shipped default of
+ * off, both from {@link ValidateSignaturesProfile}: the suite turns enforcement on, and its helper
+ * needs rootful Docker, a requirement of security groups rather than of service discovery.
*/
@QuarkusTest
-@TestProfile(EcsServiceDiscoveryDockerIntegrationTest.DockerEcsProfile.class)
+@TestProfile(ValidateSignaturesProfile.class)
class EcsServiceDiscoveryDockerIntegrationTest {
private static final String REGION = "us-east-1";
@@ -51,20 +55,6 @@ class EcsServiceDiscoveryDockerIntegrationTest {
private static final String CLOUD_MAP_SERVICE_NAME = "cache";
private static final String ECS_SERVICE_NAME = "cache-svc";
- /**
- * The registration hooks only run for a task with a container behind it, so ECS runs
- * unmocked. Security-group enforcement goes back to its shipped default of off: the test
- * suite turns it on, and its helper needs rootful Docker, which is a requirement of security
- * groups rather than of service discovery.
- */
- public static final class DockerEcsProfile implements QuarkusTestProfile {
- @Override
- public Map The overrides, and who relies on them:
+ * Each override is inert for the other classes: the ECS classes drive ECS through its injected
+ * services, so no request of theirs is signed or checked, and no signature class starts an ECS task
+ * or a container that security groups would govern.
+ *
+ * A class joins if every setting here is either one it relies on or one that never reaches its
+ * requests, and if any setting it adds never reaches the requests of a class already here.
*/
public class ValidateSignaturesProfile implements QuarkusTestProfile {
@Override
public Map
+ *
+ *
+ *