test: harden system tests (admin auth, order-independent asserts, stronger passwords)#58
Merged
nicdavidson merged 1 commit intodevelopfrom Apr 21, 2026
Merged
Conversation
…ertions, stronger passwords) - SystemServiceTest: explicitly authenticate as sysadmin in setUp so the list/get tests still pass once RBAC filtering is enforced. Replace position-based asserts (`services.0.name == 'system'`) with `assertContains` so additional services in the DB don't flake the test. - AdminResourceTest: don't assert fixed admin counts — snapshot the count before the mutation and compare deltas. Match user rows by the `name` field instead of array index. Upgrade hardcoded passwords to ones that satisfy the new strength policy so the security fixes in df-core and df-user don't cascade-break these tests. - UserResourceTestCase: matching password upgrade for shared fixture.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SystemServiceTest: explicit sysadmin auth insetUpso list/get tests still pass under RBAC filtering; replace position-based assertions withassertContains.AdminResourceTest: snapshot admin count before mutation and compare delta instead of asserting a fixed count; match user rows bynamefield instead of array index; upgrade fixture passwords to satisfy the stronger strength policy from the recent df-core / df-user security fixes.UserResourceTestCase: matching password fixture upgrade.Test plan
vendor/bin/phpunit tests/SystemServiceTest.phppassesvendor/bin/phpunit tests/AdminResourceTest.phppasses