cli
cli copied to clipboard
Add unit tests for internal/service module
What
This PR adds a comprehensive test suite for the internal/services module.
Why
- Improves code reliability and maintainability
- Makes future refactoring safer
- Provides documentation for expected behavior
Details
- Adds unit tests for:
-
Run() -
CheckVersions() -
listRemoteImages() -
suggestUpdateCmd()
-
- Uses
afero.NewMemMapFs()for in-memory filesystem testing - Uses
gockfor HTTP request mocking - Uses
testifyfor assertions
Result
- Test coverage for the module is now above 90%
- All tests pass locally
Let me know if you need any changes or improvements!