Automatische Updates, Browser-Tests, CI grün (0.63.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Has been skipped
CI / PHP 8.4 / mariadb:10.6 (pull_request) Has been skipped
CI / PHP 8.3 / mariadb:11.4 (pull_request) Has been skipped
CI / PHP 8.4 / mariadb:11.4 (pull_request) Has been skipped
CI / PHP 8.3 / mysql:8.0 (pull_request) Has been skipped
CI / PHP 8.4 / mysql:8.0 (pull_request) Has been skipped
CI / PHP 8.3 / mysql:8.4 (pull_request) Has been skipped
CI / PHP 8.4 / mysql:8.4 (pull_request) Has been skipped
CI / Browser-Tests (pull_request) Failing after 7m34s
CI / PHP 8.3 / mysql:8.4-1 (pull_request) Successful in 11m55s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 16m43s
CI / Build-Artefakte aktuell (pull_request) Successful in 13m17s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Has been skipped
CI / PHP 8.4 / mariadb:10.6 (pull_request) Has been skipped
CI / PHP 8.3 / mariadb:11.4 (pull_request) Has been skipped
CI / PHP 8.4 / mariadb:11.4 (pull_request) Has been skipped
CI / PHP 8.3 / mysql:8.0 (pull_request) Has been skipped
CI / PHP 8.4 / mysql:8.0 (pull_request) Has been skipped
CI / PHP 8.3 / mysql:8.4 (pull_request) Has been skipped
CI / PHP 8.4 / mysql:8.4 (pull_request) Has been skipped
CI / Browser-Tests (pull_request) Failing after 7m34s
CI / PHP 8.3 / mysql:8.4-1 (pull_request) Successful in 11m55s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 16m43s
CI / Build-Artefakte aktuell (pull_request) Successful in 13m17s
- Opt-in „Updates automatisch installieren“ (AutoUpdate, alle 10 Minuten) - Playwright-Tests in tests/Browser, CI-Job „Browser-Tests“ - CI: volle Matrix nur auf main, PRs mit einem MySQL-Job - MySQL-JSON-Reihenfolge in zwei Tests, QM-Suchausschnitt ohne <mark>, h1 auf Startseite/Editor Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3027a60275
commit
e211db9f30
158 changed files with 774 additions and 378 deletions
|
|
@ -5,6 +5,7 @@ namespace Tests\Feature\Update;
|
|||
use App\Models\AuditLog;
|
||||
use App\Models\User;
|
||||
use App\Support\License\LicenseStore;
|
||||
use App\Support\Update\AutoUpdate;
|
||||
use App\Support\Update\Changelog;
|
||||
use App\Support\Update\Channels;
|
||||
use App\Support\Update\Filesystem;
|
||||
|
|
@ -126,6 +127,34 @@ class UpdaterTest extends TestCase
|
|||
$this->assertEquals(['channel' => 'stable', 'sha' => self::SHA, 'migrations' => 0, 'files' => 1], $audit->data);
|
||||
}
|
||||
|
||||
public function test_auto_update_installs_only_when_enabled(): void
|
||||
{
|
||||
$zip = $this->zipContents();
|
||||
Http::fake([
|
||||
'*/check*' => Http::response(['has_update' => true, 'latest_sha' => self::SHA, 'version' => '9.9.0']),
|
||||
'*/version*' => Http::response(['sha' => self::SHA]),
|
||||
'*/zip*' => Http::response($zip, 200, ['X-Commit-Sha' => self::SHA, 'X-Content-Sha256' => hash('sha256', $zip)]),
|
||||
]);
|
||||
$target = $this->dir.'/app-root';
|
||||
mkdir($target);
|
||||
$this->app->instance(Updater::class, $this->updater($target)); // nie über das echte Projekt
|
||||
$auto = app(AutoUpdate::class);
|
||||
|
||||
$this->assertNull($auto->run());
|
||||
$this->assertFileDoesNotExist($target.'/app/Neu.php');
|
||||
|
||||
$this->actingAs(User::factory()->admin()->create())
|
||||
->postJson('/admin/update/auto', ['enabled' => true])->assertOk();
|
||||
$this->assertTrue($auto->enabled());
|
||||
|
||||
$this->assertTrue($auto->run()['pending']);
|
||||
$this->assertFileExists($target.'/app/Neu.php');
|
||||
$this->assertSame('finalize', app(UpdateProgress::class)->get()['step']);
|
||||
|
||||
// Während der zweite Schritt aussteht, startet kein weiteres Update
|
||||
$this->assertNull($auto->run());
|
||||
}
|
||||
|
||||
public function test_next_request_finishes_a_pending_update(): void
|
||||
{
|
||||
app(MaintenanceFlag::class)->activate(300);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue