Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

499 B
Raw Blame
<?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();
});