Documentation
¶
Overview ¶
Package sdktest holds AWS SDK HTTP client helpers; only test files may import it.
Index ¶
Constants ¶
const InMemoryEndpoint = "http://gopherstack.invalid"
InMemoryEndpoint is the base endpoint to pair with the client from ServeInMemory.
Variables ¶
This section is empty.
Functions ¶
func HandlerClient ¶
HandlerClient returns a client that calls h in-process (no socket); usable inside a testing/synctest bubble. Pair it with InMemoryEndpoint.
func PlainBody ¶
func PlainBody(inner aws.HTTPClient) aws.HTTPClient
PlainBody hides the request body's io.WriterTo from net/http: smithy-go's WriteTo returns io.EOF after close, which tears down live event streams (gopherstack-8wa8j).
func PlainBodyHTTPClient ¶
func PlainBodyHTTPClient() aws.HTTPClient
PlainBodyHTTPClient returns a PlainBody client with keep-alives off, avoiding stale-conn reuse.
func Serve ¶
func Serve(tb testing.TB, regs ...service.Registerable) string
Serve mounts regs behind the production service router on an httptest server and returns its URL.
func ServeInMemory ¶
ServeInMemory is Serve without a socket: the returned client calls the router in-process, so it is usable inside a testing/synctest bubble. Pair it with InMemoryEndpoint.
Types ¶
This section is empty.