mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-22 18:12:18 +01:00
`flutter test` runs on a Linux host, so credentialStore()'s Platform.isLinux branch wrote $HOME/.config/screen_locker/firebase_auth.json -- the refresh token the screen-locker daemon signs in with. firebase_backend_google_test's "stores the account under the email Firebase reports" case overwrote it with the fixture token 'refresh' on every local run; the daemon only survived by self-healing from a cached token. Dart: - lib/services/desktop_config_dir.dart: one resolver, desktopConfigRoot(), for every desktop path (the credential file's read/write/delete and the ~/.config/crdt-sync account read). @visibleForTesting override; under FLUTTER_TEST it throws StateError if the root is, or is inside, the real $HOME/.config -- so a test that bypasses the override fails loudly instead of writing. HOME unset now yields null instead of a cwd-relative .config. - The crdt-sync read resolves the root outside its catch-all, so the guard cannot be swallowed as "not connected". - test/flutter_test_config.dart gives every test its own temp config root. - The Google sign-in test now asserts the token landed in that temp root. - path_provider is unbound under flutter test (MissingPluginException), so the getApplicationSupportDirectory callers cannot reach live dirs. Python (tests only): isolate_sync_token now patches every import-time binding of SYNC_TOKEN_FILE (_constants, _manual_push, _sync_status were missed), and test_home_isolation scans all runtime modules for any Path still bound inside the real ~/.config/screen_locker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KFwA9nymhUdTrVF65kigTV |
||
|---|---|---|
| .. | ||
| _progression_test_fixtures.dart | ||
| _sync_test_fixtures.dart | ||
| backup_service_test.dart | ||
| break_clock_test.dart | ||
| break_intent_queue_test.dart | ||
| break_intent_store_test.dart | ||
| break_notification_text_test.dart | ||
| break_plugin_impls_test.dart | ||
| break_service_controller_test.dart | ||
| break_task_handler_test.dart | ||
| desktop_config_dir_test.dart | ||
| github_device_auth_test.dart | ||
| http_server_service_test.dart | ||
| lock_mode_test.dart | ||
| progression_sync_push_test.dart | ||
| progression_sync_service_test.dart | ||
| storage_service_backup_test.dart | ||
| storage_service_history_test.dart | ||
| storage_service_lastsync_test.dart | ||
| storage_service_progression_test.dart | ||
| storage_service_restore_test.dart | ||
| storage_service_sandbox_test.dart | ||
| storage_service_test.dart | ||
| sync_device_id_test.dart | ||
| sync_service_test.dart | ||
| sync_settings_test.dart | ||
| sync_state_factory_test.dart | ||
| sync_status_test.dart | ||
| workout_sync_cutover_test.dart | ||
| workout_sync_manual_survival_test.dart | ||
| workout_sync_read_test.dart | ||
| workout_sync_service_test.dart | ||