Documentation
¶
Overview ¶
Package testutil contains shared assertions for the two SDK contract suites.
Index ¶
- func CheckFields(t *testing.T, v reflect.Value, path string)
- func FailureContracts(t *testing.T, endpoints []Endpoint, client func(Transport) any)
- func InvokeJSON(t *testing.T, client any, ep Endpoint, body json.RawMessage) (any, error)
- func ResourceAlreadyGone(err error) bool
- func SafeError(err error) string
- type CleanupFailure
- type Endpoint
- type Transport
- type TurnResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFields ¶
CheckFields validates concrete decoded values as well as presence metadata, including objects inside dynamic maps and unions.
func FailureContracts ¶
FailureContracts exercises every documented endpoint through its public service method. Expected HTTP failures are independent of parameter/response fixture generation.
func InvokeJSON ¶
InvokeJSON calls one service with a documented request example. Path arguments are deliberately awkward to exercise escaping independently of payload values.
func ResourceAlreadyGone ¶
Types ¶
type CleanupFailure ¶
type CleanupFailure struct{ Err error }
CleanupFailure identifies an incomplete cleanup step, not an already deleted target resource (for example, a batch output which has not been generated).
func (*CleanupFailure) Error ¶
func (e *CleanupFailure) Error() string
func (*CleanupFailure) Unwrap ¶
func (e *CleanupFailure) Unwrap() error
type TurnResult ¶
TurnResult only accepts assistant output followed by a terminal idle event. User messages and tool output cannot satisfy the result assertion.
func (*TurnResult) Observe ¶
func (r *TurnResult) Observe(raw string) error