Skip to content

Add spec for missing binaries diagnostic

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

  1. Make sure GDK repository is cloned to your local system.
  2. Checkout 2232-missing-binaries-spec from https://gitlab.com/ramananthiruchi09/gitlab-development-kit
  3. Run bundle exec rspec spec/lib/gdk/diagnostic/missing_binaries_spec.rb -fd to run the rspecs for the file

Impacted categories

The following categories relate to this merge request:

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 doctor test added, if needed.
Edited by Ramanan Thiru

Merge request reports

Loading