Skip to content

feat: add http-sse and simple grpc application#204

Merged
officialasishkumar merged 7 commits intomainfrom
http-sse
Feb 17, 2026
Merged

feat: add http-sse and simple grpc application#204
officialasishkumar merged 7 commits intomainfrom
http-sse

Conversation

@officialasishkumar
Copy link
Member

@officialasishkumar officialasishkumar commented Feb 17, 2026

This pull request introduces a comprehensive sample project for testing a Go application that serves both standard HTTP and Server-Sent Events (SSE) endpoints using Keploy. It includes configuration files, test cases, and documentation to demonstrate how to record and replay HTTP and SSE traffic routed through a Caddy reverse proxy. The changes enable automated, production-like testing of multi-port applications.

The most important changes are:

Sample Project Setup and Documentation

  • Added a new Readme.md in the http-sse directory with detailed instructions on setting up, running, and testing a Go application with both HTTP and SSE endpoints using Keploy and Caddy as a reverse proxy.
  • Introduced a go.mod file for module initialization and Go version specification.

Caddy Reverse Proxy Configuration

  • Added Caddyfile.record and Caddyfile.replay to configure Caddy for routing /subscribe/student/events* and /subscribe/teacher/events* to the SSE server (port 8047 or 8000, depending on mode), and all other traffic to the HTTP server (port 8000). This enables accurate simulation of real-world routing during both test recording and replay. [1] [2]

Keploy Configuration and Test Artifacts

  • Added a comprehensive keploy.yml configuration file to manage Keploy's behavior for both recording and replaying tests, including port mappings, noise fields, and URL replacements for different environments.
  • Updated .gitignore to exclude test reports.

Recorded Test Cases

  • Added a set of HTTP test cases (keploy/http/tests/) covering various API endpoints, and SSE test cases (keploy/sse/tests/) for both student and teacher event streams. These YAML files enable Keploy to replay and verify application behavior. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Copilot AI review requested due to automatic review settings February 17, 2026 08:28
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

Adds a new Go sample app (http-sse) to demonstrate testing an application that serves normal HTTP endpoints and SSE endpoints on different ports, with Keploy-recorded test fixtures and Caddy reverse-proxy configs for routing.

Changes:

  • Introduces a dual-server Go app: HTTP on :8000 and SSE on :8047, plus basic endpoints and two SSE streams.
  • Adds Caddy configs for record vs replay routing, and Keploy config + recorded HTTP/SSE test cases.
  • Adds module setup (go.mod) and documentation for running/recording/testing.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
http-sse/main.go Implements HTTP handlers and SSE streaming server on a separate port, plus shutdown wiring.
http-sse/go.mod Declares the new sample module and Go version.
http-sse/Readme.md Documents architecture and steps to run Caddy, record traffic, and replay tests.
http-sse/Caddyfile.record Routes /subscribe/* to SSE port during recording.
http-sse/Caddyfile.replay Replay routing configuration (currently routes SSE to HTTP port).
http-sse/keploy.yml Keploy configuration for record/test and URL replacement rules.
http-sse/keploy/.gitignore Ignores Keploy reports output.
http-sse/keploy/http/tests/test-*.yaml Recorded Keploy HTTP test cases for the HTTP server endpoints.
http-sse/keploy/sse/tests/test-*.yaml Recorded Keploy SSE test cases for the SSE endpoints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…test cases.

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@officialasishkumar officialasishkumar changed the title feat: add http-sse application feat: add http-sse and simple grpc application Feb 17, 2026
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
@officialasishkumar officialasishkumar merged commit 203acf6 into main Feb 17, 2026
19 checks passed
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.

3 participants