feat: Improve service manager testing and error handling

- Add comprehensive testing instructions to README.
- Improve error handling in examples to prevent crashes.
- Enhance launchctl error handling for production safety.
- Improve zinit error handling for production safety.
- Remove obsolete plan_to_fix.md file.
- Update Rhai integration tests for improved robustness.
- Improve service manager creation on Linux with systemd fallback.
This commit is contained in:
Mahmoud-Emad
2025-07-02 12:05:03 +03:00
parent a63cbe2bd9
commit 95122dffee
12 changed files with 473 additions and 422 deletions

View File

@@ -129,6 +129,34 @@ herodo examples/service_manager/basic_usage.rhai
See `examples/service_manager/README.md` for detailed documentation.
## Testing
Run the test suite:
```bash
cargo test -p sal-service-manager
```
For Rhai integration tests:
```bash
cargo test -p sal-service-manager --features rhai
```
### Testing with Herodo
To test the service manager with real Rhai scripts using herodo, first build herodo:
```bash
./build_herodo.sh
```
Then run Rhai scripts that use the service manager:
```bash
herodo your_service_script.rhai
```
## Prerequisites
### Linux (zinit)