Add managed registry provisioning, pruning, and readiness tracking

This commit is contained in:
2026-06-08 20:44:16 +01:00
parent 5b977c1f41
commit 3a851db08f
52 changed files with 2706 additions and 116 deletions

View File

@@ -49,6 +49,7 @@ it('shows an operation with steps and children', function () {
'status' => OperationStatus::COMPLETED,
'script' => 'docker ps',
'logs' => 'ok',
'secrets' => ['registry_password_base64' => base64_encode('super-secret-password')],
]);
Operation::factory()->create([
@@ -63,10 +64,13 @@ it('shows an operation with steps and children', function () {
]));
$response->assertOk();
$response->assertDontSee('super-secret-password', false);
$response->assertDontSee('registry_password_base64', false);
$response->assertInertia(fn (AssertableInertia $page) => $page
->component('operations/Show', false)
->where('operation.hash', $operation->hash)
->has('operation.steps', 1)
->missing('operation.steps.0.secrets')
->has('operation.children', 1));
});
@@ -131,6 +135,7 @@ it('cancels operations and downloads logs', function () {
'script' => 'docker ps',
'logs' => 'hello',
'error_logs' => 'error',
'secrets' => ['registry_password_base64' => base64_encode('super-secret-password')],
]);
$this->actingAs($user)->post(route('operations.cancel', [
@@ -142,7 +147,8 @@ it('cancels operations and downloads logs', function () {
]));
expect($operation->refresh()->status)->toBe(OperationStatus::CANCELLED)
->and($operation->finished_at)->not->toBeNull();
->and($operation->finished_at)->not->toBeNull()
->and($operation->steps()->first()->secrets)->toBeNull();
$response = $this->actingAs($user)->get(route('operations.logs', [
'organisation' => $organisation->id,