Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a Ruby/RSpec-based integration test harness for the CLI, enabling mocked HTTP responses and request assertions. The implementation uses a Rack-based mock server that runs alongside the CLI binary during test execution.
Changes:
- Added a Rack-based mock server with control endpoints for setting responses and inspecting captured requests
- Created helper modules and RSpec configuration for managing the mock server lifecycle
- Implemented a basic integration test demonstrating authenticated API requests
- Updated CI workflow to run integration tests alongside existing unit tests
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| clients/cli/spec/support/mock_server.ru | Rack application providing mock HTTP server with control API for test setup and request recording |
| clients/cli/spec/support/mock_control.rb | Ruby module providing helper methods to interact with mock server control endpoints |
| clients/cli/spec/spec_helper.rb | RSpec configuration managing mock server lifecycle and CLI execution helpers |
| clients/cli/spec/cli_spec.rb | Integration test verifying CLI can authenticate and make API requests |
| clients/cli/Gemfile | Dependencies for the test harness (rspec, rack, rackup, webrick) |
| .github/workflows/test-cli.yml | CI workflow updates to run integration tests with Ruby setup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
theSoenke
reviewed
Feb 3, 2026
.github/workflows/test-cli.yml
Outdated
| go build . | ||
| go test -v ./... | ||
| - name: Install Ruby and rspec | ||
| uses: ruby/setup-ruby@v1 |
Collaborator
There was a problem hiding this comment.
This one should be locked to a commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a simple ruby/rspec/rack based test harness for CLI integration tests.
So far, contains only a basic test, but provides a way to mock API responses and assert requests performed by the CLI app.