func setupSimpleTransferrer( logger *logrus.Logger, cfg config.Config, ) (transferrer, error) { receiver := simple.NewReceiver(logger) return transferrer{ interruptible: receiver, transferSender: simple.NewSender(logger), transferReceiver: receiver, }, nil }
logger *logrus.Logger receiver *simple.Receiver sender *simple.Sender senderConn net.Conn receiverConn net.Conn ) BeforeEach(func() { logger = &logrus.Logger{ Out: GinkgoWriter, Level: logrus.DebugLevel, Formatter: new(logrus.TextFormatter), } receiver = simple.NewReceiver(logger) sender = simple.NewSender(logger) senderConn, receiverConn = net.Pipe() }) AfterEach(func() { Expect(senderConn.Close()).To(Succeed()) Expect(receiverConn.Close()).To(Succeed()) }) Context("when the connection is closed", func() { var ( senderConn net.Conn receiverConn net.Conn )