style: pint --test fixes (CI pint step now reachable after the test fix)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>feat/v1-foundation
parent
770bfec97f
commit
f82555469a
|
|
@ -8,6 +8,4 @@ use RuntimeException;
|
||||||
* Thrown when a confirm token fails to decode/validate or has already been used.
|
* Thrown when a confirm token fails to decode/validate or has already been used.
|
||||||
* Callers treat it as "reject the confirm" — never leaked to the operator verbatim.
|
* Callers treat it as "reject the confirm" — never leaked to the operator verbatim.
|
||||||
*/
|
*/
|
||||||
class InvalidConfirmToken extends RuntimeException
|
class InvalidConfirmToken extends RuntimeException {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ use App\Livewire\System;
|
||||||
use App\Livewire\Versions;
|
use App\Livewire\Versions;
|
||||||
use App\Livewire\Wireguard;
|
use App\Livewire\Wireguard;
|
||||||
use App\Services\DeploymentService;
|
use App\Services\DeploymentService;
|
||||||
|
use App\Services\WgStatus;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth as AuthFacade;
|
use Illuminate\Support\Facades\Auth as AuthFacade;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
@ -143,7 +144,7 @@ Route::middleware('auth')->group(function () {
|
||||||
Route::get('/release', Release\Index::class)->name('release');
|
Route::get('/release', Release\Index::class)->name('release');
|
||||||
}
|
}
|
||||||
|
|
||||||
Route::get('/wg-status.json', fn (\App\Services\WgStatus $wg) => response()->json($wg->read()))->name('wg.status');
|
Route::get('/wg-status.json', fn (WgStatus $wg) => response()->json($wg->read()))->name('wg.status');
|
||||||
|
|
||||||
// Plain Blade view — deliberately NOT a Livewire component so it survives the
|
// Plain Blade view — deliberately NOT a Livewire component so it survives the
|
||||||
// container teardown that follows an update request (R1/R2 exception, by design).
|
// container teardown that follows an update request (R1/R2 exception, by design).
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ use App\Livewire\Modals\RecoveryCodes;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use Livewire\Features\SupportTesting\Testable;
|
||||||
use Livewire\Livewire;
|
use Livewire\Livewire;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
|
@ -185,7 +186,7 @@ class RecoveryCodesModalTest extends TestCase
|
||||||
* serialized snapshot — the signed wire:snapshot blob a client could capture and replay.
|
* serialized snapshot — the signed wire:snapshot blob a client could capture and replay.
|
||||||
*
|
*
|
||||||
* @param array<int, string> $codes
|
* @param array<int, string> $codes
|
||||||
* @param \Livewire\Features\SupportTesting\Testable $component
|
* @param Testable $component
|
||||||
*/
|
*/
|
||||||
private function assertSnapshotHidesCodes(array $codes, $component): void
|
private function assertSnapshotHidesCodes(array $codes, $component): void
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ namespace Tests\Feature;
|
||||||
|
|
||||||
use App\Livewire\Release\Index;
|
use App\Livewire\Release\Index;
|
||||||
use App\Models\AuditEvent;
|
use App\Models\AuditEvent;
|
||||||
|
use App\Models\Setting;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Services\ReleaseBridge;
|
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
use Illuminate\Support\Facades\RateLimiter;
|
use Illuminate\Support\Facades\RateLimiter;
|
||||||
use Livewire\Livewire;
|
use Livewire\Livewire;
|
||||||
|
|
@ -116,19 +116,19 @@ class ReleasePageTest extends TestCase
|
||||||
public function test_save_test_server_persists_a_valid_url(): void
|
public function test_save_test_server_persists_a_valid_url(): void
|
||||||
{
|
{
|
||||||
Livewire::test(Index::class)->call('saveTestServer', 'http://staging.local');
|
Livewire::test(Index::class)->call('saveTestServer', 'http://staging.local');
|
||||||
$this->assertSame('http://staging.local', \App\Models\Setting::get('pipeline_test_server'));
|
$this->assertSame('http://staging.local', Setting::get('pipeline_test_server'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_save_test_server_rejects_a_bad_url(): void
|
public function test_save_test_server_rejects_a_bad_url(): void
|
||||||
{
|
{
|
||||||
Livewire::test(Index::class)->call('saveTestServer', 'not-a-url');
|
Livewire::test(Index::class)->call('saveTestServer', 'not-a-url');
|
||||||
$this->assertNull(\App\Models\Setting::get('pipeline_test_server'));
|
$this->assertNull(Setting::get('pipeline_test_server'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_save_test_server_empty_clears_it(): void
|
public function test_save_test_server_empty_clears_it(): void
|
||||||
{
|
{
|
||||||
\App\Models\Setting::put('pipeline_test_server', 'http://staging.local');
|
Setting::put('pipeline_test_server', 'http://staging.local');
|
||||||
Livewire::test(Index::class)->call('saveTestServer', '');
|
Livewire::test(Index::class)->call('saveTestServer', '');
|
||||||
$this->assertSame('', (string) \App\Models\Setting::get('pipeline_test_server', ''));
|
$this->assertSame('', (string) Setting::get('pipeline_test_server', ''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue