mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 16:14:42 +00:00
feat(domains): add inline indexing and redirect controls
Move domain indexing and redirect settings into domain management views and include noindex changes in deployment configuration diffs.
This commit is contained in:
1 parent
8c9a7413d0
commit
69ba001e21
22 files changed
+327
-185
No files matched your search
@@ -58,6 +58,42 @@ it('stores a diff between successful deployments', function () {
|
||||
->and(data_get($secondDeployment->configuration_diff, 'changes.0.label'))->toBe('Build command');
|
||||
});
|
||||
|
||||
it('reports noindex domain changes as requiring a redeploy', function () {
|
||||
$application = configurationChangedTestApplication([
|
||||
'fqdn' => 'https://app.example.com,https://staging.example.com',
|
||||
]);
|
||||
$deployment = configurationChangedDeployment($application);
|
||||
$application->markDeploymentConfigurationApplied($deployment);
|
||||
|
||||
$application->setNoindexDomains(['https://staging.example.com']);
|
||||
$application->save();
|
||||
|
||||
$diff = $application->refresh()->pendingDeploymentConfigurationDiff();
|
||||
$change = collect($diff->changes())->firstWhere('key', 'domains.noindex_domains');
|
||||
|
||||
expect($diff->isChanged())->toBeTrue()
|
||||
->and($change)->not->toBeNull()
|
||||
->and($change['label'])->toBe('Search engine indexing')
|
||||
->and($change['impact'])->toBe('redeploy');
|
||||
});
|
||||
|
||||
it('does not flag applications whose older snapshot omitted noindex domains', function () {
|
||||
$application = configurationChangedTestApplication([
|
||||
'fqdn' => 'https://app.example.com',
|
||||
]);
|
||||
$deployment = configurationChangedDeployment($application);
|
||||
$application->markDeploymentConfigurationApplied($deployment);
|
||||
|
||||
$snapshot = $deployment->refresh()->configuration_snapshot;
|
||||
$snapshot['sections']['domains']['items'] = collect($snapshot['sections']['domains']['items'])
|
||||
->reject(fn (array $item): bool => $item['key'] === 'noindex_domains')
|
||||
->values()
|
||||
->all();
|
||||
$deployment->update(['configuration_snapshot' => $snapshot]);
|
||||
|
||||
expect($application->refresh()->pendingDeploymentConfigurationDiff()->isChanged())->toBeFalse();
|
||||
});
|
||||
|
||||
it('checks legacy preview deployment configuration hash using preview environment variable query', function () {
|
||||
$application = configurationChangedTestApplication();
|
||||
|
||||
|
||||
Reference in new issue
Block a user