Repository navigation
test(scopes): read each catalog from its own file - #14229
Conversation
Cloud runs this suite with its own catalogs registered under the same keys, so pairing the registry with this repository's lock.json failed on every Cloud-only scope. Cloud locks its catalogs itself; this test now checks app/config/scopes/*.php against the lock next to them.
|
Review complete. No issues found — approved ✅. This single-file change makes the scope contract lock validate the shipped catalog files directly rather than the merged runtime registry. All review lenses came back clean: the catalogs are associative arrays keyed exactly as
The Reviewed commit: b31f165 |
🟢 Tier S · Ready to merge
The scope contract tests now load the project, organization, and account catalogs directly from this repository's configuration files rather than the bootstrap's global registry. Both existing lock assertions remain unchanged, and the catalog provider and lock path are adjusted to match.
📂 Walkthrough · 1
Reviewed |
Security rulesNo new WARNING or ERROR findings from security rules. 32 existing findings tracked in
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Summary
tests/unit/General/ScopesTest.php(#14206) comparedConfig::getParam('projectScopes' | 'organizationScopes' | 'accountScopes')against this repository'sapp/config/scopes/lock.json. Cloud runs the CE unit suite through its own bootstrap and registers its own, larger catalogs under the same keys. So once Cloud picks up #14206, the test fails on every Cloud-only scope (dedicatedDatabases.execute,organization.installations.read), as on appwrite-labs/cloud#6371. Cloud already locks its catalogs against its ownlock.jsonintests/unit/Config/ScopesTest.php.The test now reads each catalog from
app/config/scopes/<catalog>.phpnext to the lock, which is the fileapp/init/configs.phpregisters. That pairs this repository's scopes with this repository's lock no matter which app bootstraps the suite. The assertions are unchanged.Tests
vendor/bin/phpunit tests/unit/General/ScopesTest.php: 6 tests, 224 assertions.project.writefromapp/config/scopes/project.phpfails with "Scope 'project.write' was removed from the project scopes".--bootstrap app/init.php --configuration vendor/appwrite/server-ce/phpunit.xml, as Cloud'sCE / Unitjob runs it), with server-ce at current main:Related: #13828