mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 16:17:10 +00:00
feat(dev): add example nginx connectivity commands
Add ping and firewall up/down helpers for example nginx dev VMs. Remove the v5 home ready banner and coolify version controls, and render Flux status as a compact summary.
This commit is contained in:
1 parent
1e038fecae
commit
5c23b9aaa5
5 files changed
+123
-62
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
it('documents example nginx connectivity and firewall commands', function () {
|
||||
$process = new Process(['bash', base_path('scripts/dev.sh'), 'example-nginx', 'help'], base_path());
|
||||
|
||||
$process->run();
|
||||
|
||||
expect($process->isSuccessful())->toBeTrue()
|
||||
->and($process->getOutput())->toContain('ping')
|
||||
->and($process->getOutput())->toContain('firewall up')
|
||||
->and($process->getOutput())->toContain('firewall down')
|
||||
->and($process->getOutput())->not->toContain('firewall-up')
|
||||
->and($process->getOutput())->not->toContain('firewall-down');
|
||||
});
|
||||
|
||||
it('uses the coolify firewall wrapper for example nginx firewall changes', function () {
|
||||
$script = file_get_contents(base_path('scripts/dev.sh'));
|
||||
|
||||
expect($script)->toContain('scripts/dev.sh firewall allow "$src" "$dst" tcp 80')
|
||||
->and($script)->toContain('scripts/dev.sh firewall revoke "$src" "$dst" tcp 80');
|
||||
});
|
||||
@@ -184,7 +184,8 @@ it('serves the v5 inertia shell', function () {
|
||||
->assertSuccessful()
|
||||
->assertSee('v5-app', false)
|
||||
->assertSee('Home', false)
|
||||
->assertSee('v5-ready', false)
|
||||
->assertDontSee('v5-ready', false)
|
||||
->assertDontSee('This page is served from Laravel through Inertia and React')
|
||||
->assertSee('Running')
|
||||
->assertSee('Flux is running.')
|
||||
->assertSee('"clusters":[]', false)
|
||||
@@ -294,6 +295,27 @@ it('shows when flux is unavailable', function () {
|
||||
->assertSee('Flux socket was not found.');
|
||||
});
|
||||
|
||||
it('does not include coolify version controls on the v5 home page', function () {
|
||||
$homePage = file_get_contents(resource_path('js/v5/Pages/Home.jsx'));
|
||||
|
||||
expect($homePage)
|
||||
->not->toContain('Check coolify version')
|
||||
->not->toContain('/v5/coolify/version')
|
||||
->not->toContain('Installed version:');
|
||||
});
|
||||
|
||||
it('renders flux status as a compact summary', function () {
|
||||
$homePage = file_get_contents(resource_path('js/v5/Pages/Home.jsx'));
|
||||
|
||||
expect($homePage)
|
||||
->toContain('<strong>Flux:</strong>')
|
||||
->toContain('{flux.label}')
|
||||
->toContain('{flux.socket ? flux.socket : flux.message}')
|
||||
->not->toContain('<h2 id="flux-status-heading">Flux status</h2>')
|
||||
->not->toContain('<p>{flux.message}</p>')
|
||||
->not->toContain('Socket: {flux.socket}');
|
||||
});
|
||||
|
||||
it('checks the installed coolify version', function () {
|
||||
createSharedUserAndTeamTables();
|
||||
[$user, $team] = createV5UserWithTeam();
|
||||
|
||||
Reference in new issue
Block a user