scriptedMessagingClient maps a NATS subject to a canned reply payload (or error). Used so each fan-out request can simulate a different worker outcome without spinning up real NATS.
| 24 | // (or error). Used so each fan-out request can simulate a different worker |
| 25 | // outcome without spinning up real NATS. |
| 26 | type scriptedMessagingClient struct { |
| 27 | mu sync.Mutex |
| 28 | replies map[string][]byte |
| 29 | errs map[string]error |
| 30 | calls []requestCall |
| 31 | matchedReplies map[string][]matchedReply |
| 32 | publishes []progressPublishCall |
| 33 | scheduledProgressPublishes []scheduledProgressPublish |
| 34 | subscribes []string |
| 35 | } |
| 36 | |
| 37 | // progressPublishCall records a single Publish invocation. The progress |
| 38 | // publisher tests assert on the sequence of BackendInstallProgressEvent |
nothing calls this directly
no outgoing calls
no test coverage detected