Refactor tests and add platform-specific test cases#623
Refactor tests and add platform-specific test cases#623creativeprojects merged 2 commits intomasterfrom
Conversation
creativeprojects
commented
Apr 8, 2026
- Removed the TestFilteredArgumentsRegression from wrapper_test.go and added it to wrapper_unix_test.go for Unix-specific testing.
- Added new test files for Unix and Windows configurations, including path handling, profile settings, and command execution.
- Implemented tests for handling environment variables in Unix and Windows.
- Created tests for path fixing and symlink evaluation in Unix.
- Added tests for scheduling mechanisms across different platforms (crond, launchd, systemd, and Windows).
- Introduced tests for shell command execution and argument escaping specific to Unix.
- Ensured that all tests are properly organized and follow the build constraints for platform-specific execution.
- Removed the TestFilteredArgumentsRegression from wrapper_test.go and added it to wrapper_unix_test.go for Unix-specific testing. - Added new test files for Unix and Windows configurations, including path handling, profile settings, and command execution. - Implemented tests for handling environment variables in Unix and Windows. - Created tests for path fixing and symlink evaluation in Unix. - Added tests for scheduling mechanisms across different platforms (crond, launchd, systemd, and Windows). - Introduced tests for shell command execution and argument escaping specific to Unix. - Ensured that all tests are properly organized and follow the build constraints for platform-specific execution.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #623 +/- ##
=======================================
Coverage 80.76% 80.76%
=======================================
Files 164 164
Lines 12116 12116
=======================================
Hits 9785 9785
Misses 1836 1836
Partials 495 495
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
This PR reorganizes and expands the test suite by moving OS-dependent tests into platform-specific files (via build tags / OS filename suffixes), and adds additional coverage for path handling, scheduling backends, environment expansion, and FUSE-related remote configuration.
Changes:
- Split previously runtime-skipped tests into Unix-/Windows-/Darwin-/Systemd-specific test files using build constraints.
- Added new Unix-focused tests around argument escaping, executable path resolution, path fixing, and symlink evaluation.
- Adjusted CI/test configuration to include the
fusebuild tag and moved FUSE-dependent remote tests behind build tags.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| wrapper_unix_test.go | Moved Unix-only wrapper tests behind !windows build tag. |
| wrapper_test.go | Removed Unix-only wrapper tests from the cross-platform test file. |
| util/executable_unix_test.go | Added non-Windows executable resolution tests using a built helper binary. |
| util/executable_test.go | Removed Unix-only executable tests from the shared test file. |
| shell/expand_env_modifier_test.go | Made env expansion tests !windows via build tag instead of runtime skip. |
| shell/command_unix_test.go | Moved interrupt/signalling test to a Unix-only test file. |
| shell/command_test.go | Removed Unix-only interrupt/signalling test from cross-platform file. |
| shell/arg_unix_test.go | Added Unix-only argument escaping test cases. |
| shell/arg_test.go | Removed Unix-only argument escaping tests from cross-platform file. |
| serve_test.go | Made not-found assertion cross-platform by loosening error-message matching. |
| schedule/schedule_windows_test.go | Added Windows scheduler init test (Windows-only via filename suffix). |
| schedule/schedule_test.go | Removed platform-specific scheduler init tests from shared test file. |
| schedule/schedule_systemd_test.go | Added systemd init test behind !windows && !darwin build tag. |
| schedule/schedule_darwin_test.go | Added launchd init test (Darwin-only via filename suffix). |
| schedule/schedule_crond_test.go | Added crond init test behind !windows build tag. |
| schedule/handler_test.go | Made lookupBinary tests !windows via build tag instead of runtime skip. |
| remote_test.go | Removed FUSE-dependent remote configuration tests from the default test set. |
| remote_fuse_test.go | Added FUSE-gated remote configuration tests behind !windows && fuse. |
| Makefile | Updated test-ci to always run tests with -tags=fuse. |
| main_test.go | Simplified binary naming using platform.Executable(...). |
| lock/lock_test.go | Removed non-Windows signal tests from shared lock tests. |
| lock/lock_signal_test.go | Added !windows signal-handling tests in a dedicated file. |
| integration_test.go | Improved Windows skip message for unsupported integration fixtures. |
| fuse/mount_test.go | Gated FUSE mount tests behind !windows && fuse. |
| filesearch/filesearch_unix_test.go | Added !windows tests for tilde expansion and root-relative path behavior. |
| filesearch/filesearch_test.go | Removed Unix-only filesearch tests from the shared test file. |
| config/profile_unix_test.go | Added !windows tests for root/path resolution in profiles. |
| config/profile_test.go | Removed Unix-only profile/path tests from shared test file. |
| config/path_windows_test.go | Added Windows-specific path-fixing tests (Windows-only via filename suffix). |
| config/path_unix_test.go | Added !windows path-fixing + symlink evaluation tests. |
| config/path_test.go | Removed OS-specific path tests from shared file, leaving common env expansion tests. |
| config/jsonschema/schema_test.go | Removed the !ajv_test build constraint from the schema tests. |
| config/confidential_unix_test.go | Added !windows confidential/env-var behavior tests. |
| config/confidential_test.go | Removed Unix-only confidential/env-var tests from shared file. |
| .vscode/settings.json | Updated local Go build tags to include fuse. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…st command timeout checks