mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 01:20:31 +00:00
Fix: Fragile service name parsing in applyServiceApplicationPrerequisites
Changed from `->before('-')` to `->beforeLast('-')` to correctly parse service
names with hyphens. This fixes prerequisite application for ~230+ services
containing hyphens in their template names (e.g., docker-registry,
elasticsearch-with-kibana).
Added comprehensive test coverage for hyphenated service names and fixed
existing tests to use realistic CUID2 UUID format. All unit tests pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,6 @@ use App\Actions\Server\UpdateCoolify;
|
||||
use App\Models\InstanceSettings;
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
beforeEach(function () {
|
||||
@@ -46,7 +45,7 @@ it('validates cache against running version before fallback', function () {
|
||||
|
||||
config(['constants.coolify.version' => '4.0.10']);
|
||||
|
||||
$action = new UpdateCoolify();
|
||||
$action = new UpdateCoolify;
|
||||
|
||||
// Should throw exception - cache is older than running
|
||||
try {
|
||||
@@ -115,7 +114,7 @@ it('prevents downgrade even with manual update', function () {
|
||||
// Current version is newer
|
||||
config(['constants.coolify.version' => '4.0.10']);
|
||||
|
||||
$action = new UpdateCoolify();
|
||||
$action = new UpdateCoolify;
|
||||
|
||||
\Illuminate\Support\Facades\Log::shouldReceive('error')
|
||||
->once()
|
||||
|
||||
Reference in New Issue
Block a user