Skip to content

test(ci): isolate AppConfig-dependent policy integration checks - #9350

Merged
vitormattos merged 1 commit into
mainfrom
fix/phpunit-policy-appconfig-isolation-20261104
Nov 4, 2026
Merged

vitormattos merged 1 commit into
mainfrom
fix/phpunit-policy-appconfig-isolation-20261104

Conversation

@vitormattos

@vitormattos vitormattos commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Problem

PR #9343 only updates the Bats GitHub Action, yet MySQL, PostgreSQL, MariaDB, and SQLite PHPUnit workflows fail on two integration tests. Both failures persist on a rerun of the failed jobs.

LibreSign's API/integration test base temporarily replaces global IAppConfig with the in-memory AppConfigOverwrite. The Nextcloud container may retain an app-scoped PolicySource constructed with that replacement, causing later integration tests that expect real database persistence to load defaults or miss writes. Related test contamination was documented on #9238/#9242.

Changes

  • Isolate the migration's real-AppConfig load/save contract in a separate PHPUnit process.
  • Isolate the explicit-default persistence and rule-count contract in a separate PHPUnit process.
  • Disable PHPUnit global-state preservation to prevent inherited test overrides or cached services.
  • Preserve the existing assertions for database persistence and counts. No production, Bats, or dependency changes.

Validation

  • Re-ran the failed jobs on chore(deps): Bump bats-core/bats-action from 4.0.0 to 4.1.0 #9343: the same two integration failures reproduced on MySQL and SQLite.
  • PHPUnit is green on this PR in every configured matrix: MySQL (PHP 8.3, 8.4, 8.5), MariaDB 10.6/11.4 (PHP 8.5), PostgreSQL (PHP 8.5), and SQLite (PHP 8.5). Both previously failing tests are exercised with their original database assertions.
  • Static analysis, Playwright, Node tests, PHP-CS-Fixer, all lint workflows, OpenAPI, and REUSE passed.
  • Behat MySQL, PostgreSQL, MariaDB, and SQLite remain in progress; no claim of full green CI until they complete.
  • Commit bee9aaf was verified GPG-signed and DCO-compliant.

Related: #9343, #9238, #9242.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos requested a review from a team as a code owner November 4, 2026 18:03
@vitormattos
vitormattos merged commit 505b7b9 into main Nov 4, 2026
66 checks passed
@vitormattos
vitormattos deleted the fix/phpunit-policy-appconfig-isolation-20261104 branch November 4, 2026 18:20
@vitormattos vitormattos added this to the Next Major (36) milestone Nov 6, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant