Skip to content

Test railsclient requests with a local HTTP server - #7

Draft
NginxL wants to merge 1 commit into
AngelP17:mainfrom
NginxL:test/1-railsclient-http
Draft

NginxL wants to merge 1 commit into
AngelP17:mainfrom
NginxL:test/1-railsclient-http

Conversation

@NginxL

@NginxL NginxL commented Dec 5, 2026

Copy link
Copy Markdown

What changed

Closes #1.

Reworks the railsclient request coverage into table-driven local httptest.Server tests:

  • TestGetReleaseGate covers HTTP 200 and 423 responses, verifies the GET method, route and shard query, and decodes the JSON allowed field.
  • TestPostJSON covers 202 and 500 responses, verifies POST method, route, JSON content type and request-body decoding, and checks the returned error.

No Rails deployment or remote credentials are used.

Verification

From go/agent-runner:

  • go test ./... — passed; internal/railsclient and all other packages passed.
  • go vet ./... — passed.

A real Rails integration run was not performed; this PR covers the HTTP client boundary with a local fake server as requested.

AI disclosure

This contribution was prepared with AI assistance. I reviewed the request assertions and ran the Go checks above.

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.

Test the Go runner Rails client with a local HTTP server

1 participant