mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-25 22:28:26 +00:00
Split V5 dashboard behavior into domain controllers and policies, add agent token rotation/revocation, status reconciliation jobs, ingress firewall syncing, and canvas connection APIs. Add migrations for V5 status tracking, server capabilities, resource connection aliases, and revoked agent tokens.
37 lines
1.3 KiB
PHP
37 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @param string|array<int, string> $queue
|
|
* @return array<int, string>
|
|
*/
|
|
function horizonSupervisorQueues(string|array $queue): array
|
|
{
|
|
$queues = is_array($queue) ? $queue : explode(',', $queue);
|
|
|
|
return array_map('trim', $queues);
|
|
}
|
|
|
|
it('defines a horizon supervisor that consumes the v5-reconcile queue', function () {
|
|
$supervisors = config('horizon.defaults');
|
|
|
|
$handlesReconcile = collect($supervisors)->contains(
|
|
fn (array $config): bool => in_array('v5-reconcile', horizonSupervisorQueues($config['queue'] ?? ''), true)
|
|
);
|
|
|
|
expect($handlesReconcile)->toBeTrue();
|
|
});
|
|
|
|
it('provisions the v5-reconcile supervisor in both production and local environments', function () {
|
|
expect(config('horizon.environments.production.v5reconcile'))->toBeArray()
|
|
->and(config('horizon.environments.local.v5reconcile'))->toBeArray()
|
|
->and(config('horizon.defaults.v5reconcile.queue'))->toBe('v5-reconcile');
|
|
});
|
|
|
|
it('keeps the v5-reconcile supervisor isolated from the user-facing deploy queues', function () {
|
|
$reconcileQueues = horizonSupervisorQueues(config('horizon.defaults.v5reconcile.queue'));
|
|
|
|
expect($reconcileQueues)->not->toContain('high')
|
|
->and($reconcileQueues)->not->toContain('default')
|
|
->and(config('horizon.defaults.v5reconcile.nice'))->toBeGreaterThan(0);
|
|
});
|