mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
fix(storage): split S3 endpoint input and persist stopped status
Persist exited status across application, database, service, and preview stop paths, and reuse the split host/port/path input for S3 endpoints with linked validation feedback.
This commit is contained in:
1 parent
ec8a24d178
commit
2677e47138
12 files changed
+132
-30
No files matched your search
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\MessageBag;
|
||||
use Illuminate\Support\ViewErrorBag;
|
||||
|
||||
it('renders configurable host copy for S3 endpoints', function () {
|
||||
View::share('errors', new ViewErrorBag);
|
||||
|
||||
$html = Blade::render(<<<'BLADE'
|
||||
<x-forms.domain-input id="endpoint" :wire="false" value="http://192.168.1.50:9000/s3"
|
||||
host-label="Host" host-placeholder="minio.internal or 192.168.1.50" />
|
||||
BLADE);
|
||||
|
||||
expect($html)
|
||||
->toContain('Host')
|
||||
->toContain('minio.internal or 192.168.1.50')
|
||||
->toContain("scheme: 'https'")
|
||||
->toContain("host: ''")
|
||||
->toContain("port: ''")
|
||||
->toContain("path: ''");
|
||||
});
|
||||
|
||||
it('keeps validation errors attached to the composed endpoint', function () {
|
||||
$settingsUrl = route('settings.advanced').'#endpoint-section';
|
||||
$errors = new ViewErrorBag;
|
||||
$errors->put('default', new MessageBag([
|
||||
'endpoint' => "The endpoint is invalid. Configure allowed internal targets: {$settingsUrl}",
|
||||
]));
|
||||
View::share('errors', $errors);
|
||||
|
||||
$html = Blade::render('<x-forms.domain-input id="endpoint" :wire="false" />');
|
||||
|
||||
expect($html)
|
||||
->toContain('The endpoint is invalid.')
|
||||
->toContain('href="'.$settingsUrl.'"')
|
||||
->toContain('Set them here.');
|
||||
});
|
||||
Reference in new issue
Block a user