From 9b1240274d3b0fd1fe40f7fe388739e43c5fd1bd Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:54:57 +0200 Subject: [PATCH] test(deploy): assert containerConfig round-trip + strict RUNNING in snapshot IT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the missing containerConfig assertion to snapshot_isPopulated_whenDeploymentReachesRunning (runtimeType + appPort entries), and tightens the await predicate from .isIn(RUNNING, DEGRADED) to .isEqualTo(RUNNING) — the mock returns a healthy container so RUNNING is deterministic. Co-Authored-By: Claude Sonnet 4.6 --- .../cameleer/server/app/runtime/DeploymentSnapshotIT.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cameleer-server-app/src/test/java/com/cameleer/server/app/runtime/DeploymentSnapshotIT.java b/cameleer-server-app/src/test/java/com/cameleer/server/app/runtime/DeploymentSnapshotIT.java index 6ef09137..3c4d607a 100644 --- a/cameleer-server-app/src/test/java/com/cameleer/server/app/runtime/DeploymentSnapshotIT.java +++ b/cameleer-server-app/src/test/java/com/cameleer/server/app/runtime/DeploymentSnapshotIT.java @@ -124,7 +124,7 @@ class DeploymentSnapshotIT extends AbstractPostgresIT { .untilAsserted(() -> { Deployment d = deploymentRepository.findById(UUID.fromString(deploymentId)) .orElseThrow(() -> new AssertionError("Deployment not found: " + deploymentId)); - assertThat(d.status()).isIn(DeploymentStatus.RUNNING, DeploymentStatus.DEGRADED); + assertThat(d.status()).isEqualTo(DeploymentStatus.RUNNING); deploymentRef.set(d); }); @@ -136,6 +136,9 @@ class DeploymentSnapshotIT extends AbstractPostgresIT { assertThat(deployed.deployedConfigSnapshot().agentConfig()).isNotNull(); assertThat(deployed.deployedConfigSnapshot().agentConfig().getSamplingRate()) .isEqualTo(0.25); + assertThat(deployed.deployedConfigSnapshot().containerConfig()) + .containsEntry("runtimeType", "spring-boot") + .containsEntry("appPort", 8081); } // -----------------------------------------------------------------------