Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSSHKeypair ¶ added in v0.7.9
GenerateSSHKeypair generates an ed25519 keypair, writes the private and public key files to a temp directory, and returns the private key file path and the corresponding ssh.PublicKey.
Types ¶
type Collaboration ¶
type ExecResponse ¶
type FakeAnthropic ¶
type FakeAnthropic struct {
http.Handler
Recorder *recorder.RequestRecorder
// contains filtered or unexported fields
}
FakeAnthropic serves canned responses for the Anthropic Messages API.
func NewFakeAnthropic ¶
func NewFakeAnthropic(responses ...string) *FakeAnthropic
func (*FakeAnthropic) SetTokenLimitErrors ¶
func (f *FakeAnthropic) SetTokenLimitErrors(n int)
SetTokenLimitErrors configures the fake to return n consecutive "prompt is too long" errors before returning normal responses.
type FakeCircleCI ¶
type FakeCircleCI struct {
http.Handler
Recorder *recorder.RequestRecorder
Collaborations []Collaboration
Projects []Project
Sandboxes []Sandbox
RunResponse *RunResponse
AddKeyURL string
ExecResponse *ExecResponse
RunStatusCode int // override status code for trigger run endpoint
// Per-endpoint status code overrides for testing error responses.
ListStatusCode int // override for GET /sandbox/instances
CreateStatusCode int // override for POST /sandbox/instances
ExecStatusCode int // override for POST /sandbox/instances/:id/exec
AddKeyStatusCode int // override for POST /sandbox/instances/:id/ssh/add-key
// contains filtered or unexported fields
}
FakeCircleCI serves canned responses for the CircleCI API.
func NewFakeCircleCI ¶
func NewFakeCircleCI() *FakeCircleCI
type FakeGitHub ¶
type FakeGitHub struct {
http.Handler
Recorder *recorder.RequestRecorder
// contains filtered or unexported fields
}
FakeGitHub serves canned responses for GitHub's GraphQL API.
func NewFakeGitHub ¶
func NewFakeGitHub() *FakeGitHub
func (*FakeGitHub) SetOrgRepos ¶
func (f *FakeGitHub) SetOrgRepos(resp string)
func (*FakeGitHub) SetOrgValidation ¶
func (f *FakeGitHub) SetOrgValidation(resp string)
func (*FakeGitHub) SetRateLimit ¶
func (f *FakeGitHub) SetRateLimit(resp string)
func (*FakeGitHub) SetRepoError ¶
func (f *FakeGitHub) SetRepoError(repo string, resp string)
func (*FakeGitHub) SetReviewActivity ¶
func (f *FakeGitHub) SetReviewActivity(repo string, resp string)
type RunResponse ¶
type SSHServer ¶ added in v0.7.9
type SSHServer struct {
// contains filtered or unexported fields
}
SSHServer is a TLS+SSH server for testing SSH-based sandbox interactions. It accepts a single authorized public key and records exec requests.
func NewSSHServer ¶ added in v0.7.9
NewSSHServer starts a TLS+SSH server that accepts connections authenticated with authorizedKey. The server is shut down automatically when the test ends.
func (*SSHServer) Addr ¶ added in v0.7.9
Addr returns the "host:port" address the server is listening on.