test(deploy): assert containerConfig round-trip + strict RUNNING in snapshot IT
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user