Files
coolify/tests/Feature/Api/ApplicationRollbackImagesApiTest.php
Andras Bacsai 3d8cea9e3c feat(rollback): list Docker registry images of recent deployments
Rollback now also lists the commit images of the last 10 successful
deployments when the application pushes to a Docker registry. The
deployment pulls such an image when the server no longer has it.
The page and the API share GetRollbackImages, and the API returns a
source field (local or registry).
2026-10-19 10:10:48 +02:00

14 lines
499 B
PHP

<?php
use App\Actions\Application\GetRollbackImages;
it('extracts the current rollback image tag when the registry includes a port', function () {
expect(GetRollbackImages::imageTag('registry.example.com:5000/team/application:commit-sha'))
->toBe('commit-sha');
});
it('does not treat a digest as the current rollback image tag', function () {
expect(GetRollbackImages::imageTag('registry.example.com:5000/team/application@sha256:'.str_repeat('a', 64)))
->toBeNull();
});