fix: force-pull images on install and fix provisioning test assertions
All checks were successful
CI / build (push) Successful in 1m11s
CI / docker (push) Successful in 47s

Installers now use `--pull always --force-recreate` on `docker compose up`
to ensure fresh images are used on every install/reinstall, preventing
stale containers from missing schema changes like db_password.

Fix VendorTenantServiceTest to expect two repository saves in provisioning
tests (one for dbPassword, one for final status).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-15 08:50:40 +02:00
parent 6eb848f353
commit 15306dddc0
3 changed files with 5 additions and 4 deletions

View File

@@ -1119,7 +1119,7 @@ function Invoke-ComposeUp {
$c = $script:cfg
Log-Info 'Starting Cameleer platform...'
Push-Location $c.InstallDir
try { docker compose -p $c.ComposeProject up -d }
try { docker compose -p $c.ComposeProject up -d --pull always --force-recreate }
finally { Pop-Location }
Log-Info 'Containers started -- verifying health next.'
}

View File

@@ -1144,7 +1144,7 @@ docker_compose_pull() {
docker_compose_up() {
log_info "Starting Cameleer SaaS platform..."
(cd "$INSTALL_DIR" && docker compose -p "$COMPOSE_PROJECT" up -d) || true
(cd "$INSTALL_DIR" && docker compose -p "$COMPOSE_PROJECT" up -d --pull always --force-recreate) || true
log_info "Containers started — verifying health next."
}

View File

@@ -33,6 +33,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -153,7 +154,7 @@ class VendorTenantServiceTest {
assertThat(tenant.getStatus()).isEqualTo(TenantStatus.ACTIVE);
assertThat(tenant.getServerEndpoint()).isEqualTo("http://server:8080");
assertThat(tenant.getProvisionError()).isNull();
verify(tenantRepository).save(tenant);
verify(tenantRepository, times(2)).save(tenant);
}
@Test
@@ -175,7 +176,7 @@ class VendorTenantServiceTest {
// provisionAsync modifies the tenant entity in-place (runs synchronously in unit tests)
assertThat(tenant.getProvisionError()).isEqualTo("Docker failure");
assertThat(tenant.getStatus()).isEqualTo(TenantStatus.PROVISIONING);
verify(tenantRepository).save(tenant);
verify(tenantRepository, times(2)).save(tenant);
}
@Test