mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-07 06:28:43 +00:00
fix(proxy): add validation and normalization for database proxy timeout
- Extract proxy timeout configuration logic into dedicated method - Add min:1 validation rule for publicPortTimeout - Normalize invalid timeout values (null, 0, negative) to default 3600s - Add tests for timeout configuration normalization and validation
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
use App\Livewire\Project\Service\Index;
|
||||
|
||||
test('service database proxy timeout requires a minimum of one second', function () {
|
||||
$component = new Index;
|
||||
$rules = (fn (): array => $this->rules)->call($component);
|
||||
|
||||
expect($rules['publicPortTimeout'])
|
||||
->toContain('min:1');
|
||||
});
|
||||
Reference in New Issue
Block a user