API for cognitect.aws.client.test-double - aws-api


Full namespace name: cognitect.aws.client.test-double

Overview

Provides a test implementation of the aws client, which can be passed
to the functions in the cognitect.aws.client.api ns.

Public Variables and Functions



client

function
Usage: (client {:keys [api ops]})
Given a map with :api and :ops (optional), returns a test double client that
you can pass to `cognitect.aws.client.api/invoke` and `cognitect.aws.client.api/stop`
in implementation code.
 
You can provide :ops on creation or use `instrument` to add them later.

:ops should be a map of operation (keyword) to one of
- a function of op-map that returns a response map
- a literal response map

Notes:
- you must instrument every op that will be invoked during a test
- every op must be supported
  - See (keys (cognitect.aws.client.api/ops <test-client>))
- will validate request payloads passed to `invoke` by default
  - you can disable request validation with (cognitect.aws.client.api/validate-requests client false)
- will not validate response payloads


instrument

function
Usage: (instrument client ops)
Given a test double client and a `:ops` map of operations to handlers,
instruments the client with handlers. See `client` for more info about
`:ops`.
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.