Documentation
¶
Overview ¶
Package ohfake is a fake OpenHands Agent Server for tests: the subset of the v1.54.0 API the openhands executor uses, over a real directory standing in for the server's filesystem. It lives outside _test.go files so the executor's tests and the workflow's end-to-end tests share one fake.
Index ¶
- type Conv
- type Server
- func (f *Server) Conv(id string) *Conv
- func (f *Server) Count(key string) int
- func (f *Server) Creates() []map[string]any
- func (f *Server) DeleteConv(id string)
- func (f *Server) Exclude(name string)
- func (f *Server) FailNext(key string, n int)
- func (f *Server) OnlyConv(t *testing.T) *Conv
- func (f *Server) URL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conv ¶
type Conv struct {
// contains filtered or unexported fields
}
func (*Conv) EventCount ¶
func (*Conv) Messages ¶
Messages returns the user messages sent into the conversation after it started, in order.
type Server ¶
type Server struct {
// agent is what runs when a conversation starts.
Agent func(c *Conv, dir string)
// contains filtered or unexported fields
}
Server implements the subset of the OpenHands Agent Server API (v1.54.0) the executor uses, over a real directory standing in for the server's filesystem. The "agent" is a Go func the test supplies; it runs when the conversation starts and can block on a channel so a test can act mid-run (restart the daemon, cancel, delete the conversation).