mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
feat(v5): gate V5 to development environments only
Introduce V5Feature and config so V5 routes, jobs, commands, morph maps, and model queries run only when enabled. Move V5 migrations to migrations-v5 (loaded only when enabled), remove Flux from production Docker/install paths, and add isolation tests.
This commit is contained in:
1 parent
1cb1d028de
commit
d0247d3b09
45 files changed
+273
-218
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Environment;
|
||||
use App\Models\Project;
|
||||
use App\Models\Team;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\Support\V5TestSchema;
|
||||
|
||||
uses(RefreshDatabase::class);
|
||||
|
||||
it('keeps v4 project and environment checks working without the v5 schema', function () {
|
||||
config()->set('v5.enabled', false);
|
||||
|
||||
$team = Team::factory()->create();
|
||||
$project = Project::factory()->create(['team_id' => $team->id]);
|
||||
$environment = Environment::factory()->create(['project_id' => $project->id]);
|
||||
|
||||
V5TestSchema::dropAllTables();
|
||||
|
||||
expect($project->isEmpty())->toBeTrue()
|
||||
->and($environment->isEmpty())->toBeTrue();
|
||||
});
|
||||
Reference in new issue
Block a user