mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
v4.7 (#12478)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Co-authored-by: Aditya Tripathi <aditya@climactic.co>
This commit is contained in:
co-authored by
Claude Opus 5.5
peaklabs-dev
Aditya Tripathi
parent
b7dc2e435b
commit
033f0c84da
@@ -11,6 +11,8 @@ use App\Models\GiteaApp;
|
||||
use App\Models\GithubApp;
|
||||
use App\Models\GithubRunnerConfig;
|
||||
use App\Models\GitlabApp;
|
||||
use App\Models\ImageScanIgnore;
|
||||
use App\Models\ImageScanPolicy;
|
||||
use App\Models\InstanceSettings;
|
||||
use App\Models\IntegrationToken;
|
||||
use App\Models\LocalFileVolume;
|
||||
@@ -24,6 +26,7 @@ use App\Models\ScheduledDatabaseBackup;
|
||||
use App\Models\ScheduledTask;
|
||||
use App\Models\ScheduledVolumeBackup;
|
||||
use App\Models\Server;
|
||||
use App\Models\ServerSetting;
|
||||
use App\Models\Service;
|
||||
use App\Models\ServiceApplication;
|
||||
use App\Models\ServiceDatabase;
|
||||
@@ -155,6 +158,9 @@ beforeEach(function () {
|
||||
'source_type' => $application->getMorphClass(), 'source_id' => $application->id,
|
||||
'target_type' => $service->getMorphClass(), 'target_id' => $service->id,
|
||||
]);
|
||||
transferCoverageRecord(ImageScanPolicy::class, ['scope_type' => $this->server->getMorphClass(), 'scope_id' => $this->server->id, 'gate_mode' => 'strict', 'on_scan_error' => 'block', 'count_medium' => true]);
|
||||
transferCoverageRecord(ImageScanPolicy::class, ['scope_type' => $application->getMorphClass(), 'scope_id' => $application->id, 'gate_mode' => 'on']);
|
||||
transferCoverageRecord(ImageScanIgnore::class, [...$teamId, 'resource_type' => $application->getMorphClass(), 'resource_id' => $application->id, 'vulnerability_id' => 'CVE-2024-1', 'package' => 'openssl', 'expires_at' => now()->addYear()]);
|
||||
transferCoverageRecord(GithubRunnerConfig::class, ['server_id' => $this->server->id, 'github_app_id' => $githubApp->id, 'labels' => ['coverage']]);
|
||||
transferCoverageRecord(ServiceApplication::class, ['service_id' => $service->id]);
|
||||
transferCoverageRecord(ServiceDatabase::class, ['service_id' => $service->id]);
|
||||
@@ -235,6 +241,8 @@ test('every exported value arrives unchanged on the target', function () {
|
||||
];
|
||||
$values = [
|
||||
Server::class => ['proxy' => ['type' => 'TRAEFIK', 'status' => 'running', 'redirect_enabled' => false, 'redirect_url' => 'https://fuzz.example.test']],
|
||||
// The import accepts only valid host key lines.
|
||||
ServerSetting::class => ['ssh_host_key' => 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKgKlP9E2JBLjQ8DDxZUaI5vOJlvo8Uv06UAyqDbyC2I'],
|
||||
Application::class => ['fqdn' => 'https://fuzz-a.example.test,https://fuzz-b.example.test', 'domain_port_overrides' => null, 'noindex_domains' => ['https://fuzz-b.example.test']],
|
||||
ApplicationPreview::class => ['fqdn' => 'https://pr-fuzz.example.test', 'domain_port_overrides' => null],
|
||||
ServiceApplication::class => ['fqdn' => 'https://fuzz-service.example.test', 'domain_port_overrides' => null, 'noindex_domains' => []],
|
||||
@@ -292,6 +300,7 @@ test('every exported value arrives unchanged on the target', function () {
|
||||
$changedOnPurpose = [
|
||||
'last_online_at' => 'The import sets the status, which sets the time.',
|
||||
'GithubRunnerConfig.is_enabled' => 'The target disables the runners until the user enables them.',
|
||||
'ServerSetting.ssh_host_key_source' => 'The import marks a moved host key as transfer.',
|
||||
];
|
||||
expect(ServerTransferSnapshot::diff($before, ServerTransferSnapshot::take($this->server->uuid), $changedOnPurpose)['unexplained'])->toBe([]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user