Add spec for missing binaries diagnostic
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this merge request do and why?
Closes #Issue 2232
| Test Category | Requirement |
|---|---|
| Basic Functionality | |
#success? returns true when all binaries exist |
|
#success? returns false when binaries missing |
|
#detail returns nil when all binaries present |
|
#detail returns helpful instructions when missing |
|
| Individual Binary Tests | |
| Gitaly binary missing detection | |
| GitLab Shell binary missing detection | |
| Workhorse binary missing detection | |
| Special Cases | |
| Workhorse glob pattern - file exists | |
| Workhorse glob pattern - no files found | |
| GraphQL schema always passes | |
| Configuration Handling | |
| OpenBao enabled - missing binary fails | |
| OpenBao disabled - missing binary ignored | |
| OpenBao enabled - included in error message | |
| Test Patterns | |
File system mocking (File.exist?, File.executable?) |
|
Configuration mocking (stub_gdk_yaml) |
|
| PackageConfig mocking | |
| Helper Methods | |
mock_all_binaries_exist |
|
mock_all_binaries_missing |
|
mock_specific_binary_paths |
|
| Shared examples for DRY testing | |
| Message Verification | |
| Complete message format with heredoc | |
| Specific binary inclusion in messages | |
| Setup command suggestions |
How to set up and validate locally
- Make sure GDK repository is cloned to your local system.
- Checkout 2232-missing-binaries-spec from https://gitlab.com/ramananthiruchi09/gitlab-development-kit
- Run
bundle exec rspec spec/lib/gdk/diagnostic/missing_binaries_spec.rb -fdto run the rspecs for the file
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Merge request checklist
-
This MR references an issue describing the change. -
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise an issue to follow-up. -
Documentation added/updated, if needed. -
Announcement added, if change is notable. -
gdk doctortest added, if needed.
Edited by Ramanan Thiru