Skip to content

Conversation

@jablan
Copy link
Collaborator

@jablan jablan commented Jan 29, 2026

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.

@jablan jablan marked this pull request as ready for review January 30, 2026 14:34
@jablan jablan requested a review from Copilot January 30, 2026 14:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@jablan jablan requested a review from theSoenke January 30, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants