connections []context.Context
}
+// WhatsAppFakeSend is one send of the fake: the chat, the text, and the message
+// ID.
+type WhatsAppFakeSend struct {
+ to string
+ text string
+ id string
+}
+
+// WhatsAppRetryTest runs WhatsApp without a model or network client call. All
+// timers and channels belong to its synctest bubble, so backoff uses fake time.
+type WhatsAppRetryTest struct {
+ whatsapp *WhatsApp
+ fake *WhatsAppFake
+ logs *SyncBuffer
+ loop *TurnLoop
+ events *TurnEventRecorder
+ cancel context.CancelFunc
+ done chan error
+}
+
// ConnectContext keeps ctx and tells the test that the daemon connected.
func (f *WhatsAppFake) ConnectContext(ctx context.Context) error {
f.mutex.Lock()
return f
}
-// WhatsAppFakeSend is one send of the fake: the chat, the text, and the message
-// ID.
-type WhatsAppFakeSend struct {
- to string
- text string
- id string
-}
-
-// WhatsAppRetryTest runs WhatsApp without a model or network client call. All
-// timers and channels belong to its synctest bubble, so backoff uses fake time.
-type WhatsAppRetryTest struct {
- whatsapp *WhatsApp
- fake *WhatsAppFake
- logs *SyncBuffer
- loop *TurnLoop
- events *TurnEventRecorder
- cancel context.CancelFunc
- done chan error
-}
-
func (r *WhatsAppRetryTest) start(t *testing.T) {
t.Helper()