chore: add unit tests for package:install and package:uninstall commands#977
chore: add unit tests for package:install and package:uninstall commands#977
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds unit tests for the package:install and package:uninstall commands to verify their signature, description, extension, and handling behavior.
- Adds tests for package uninstall command covering error handling and success scenarios.
- Adds tests for package install command validating installation failure and success cases.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| foundation/console/package_uninstall_command_test.go | Unit tests for verifying the uninstall command behavior and error messages. |
| foundation/console/package_install_command_test.go | Unit tests for verifying the install command behavior and proper error messages. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #977 +/- ##
==========================================
+ Coverage 69.10% 70.07% +0.97%
==========================================
Files 168 168
Lines 11340 11340
==========================================
+ Hits 7836 7946 +110
+ Misses 3152 3042 -110
Partials 352 352 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // TODO: A real package needs to be created to test installation | ||
| // when goravel/goravel upgrades all internal default dependencies to the latest version. |
There was a problem hiding this comment.
Is it possible to implement here? If not, we may test it in goravel/example, and remove these lines.
There was a problem hiding this comment.
We can clone the goravel/goravel repository, then use make:package to create a local package. After that, install it with package:install and perform some assertions. However, some dependencies in goravel/goravel, such as gin, are not up-to-date, which causes the artisan commands to fail.
There was a problem hiding this comment.
Yes, I suggest removing this case here and testing the logic in goravel/example.
📑 Description
Closes https://github.com/goravel/goravel/issues/
✅ Checks