-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
7 tests consistently fail when run via Scripts/run-tests-safe.sh because the script sets HOME to a temp directory for isolation, but these tests expect real system plist paths or launchctl state.
Failing Tests
PrivilegedOperationsCoordinatorTests.testRegenerateServiceConfigurationAllowsPendingApprovalPostconditionPrivilegedOperationsCoordinatorTests.testRestartUnhealthyServicesFailsWhenPostconditionTimesOutServiceBootstrapperTests.testLoadServicesInTestModeReturnsFalseWhenAnyPlistMissingServiceBootstrapperTests.testRepairVHIDDaemonServicesInTestModeSetsOutputServiceBootstrapperTests.testUnloadAndInstallPathsReturnSuccessInTestModeServiceHealthCheckerTests.testCheckKanataServiceHealthDoesNotProbeSystemInTestModeServiceHealthCheckerTests.testIsServiceLoadedUsesPlistExistenceInTestMode
Root Cause
run-tests-safe.sh sets HOME to a temp directory to prevent parallel-agent collisions and keep tests hermetic. These tests rely on system paths derived from HOME (e.g., ~/Library/LaunchDaemons/) which don't exist in the temp directory.
Proposed Fix
- Add test-mode path remapping or mock the plist existence checks
- Ensure
TestEnvironment.isRunningTestsguards are in place for system-dependent operations - Alternatively, create required directory structure in the temp HOME during test setUp
Context
Discovered while fixing CI for PR #217 (Karabiner converter). These failures are pre-existing on master and unrelated to that feature.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels