testServer = httptest.NewServer(fakeHandler) trafficControllerURL = "ws://" + testServer.Listener.Addr().String() appGuid = "app-guid" } Describe("Debug Printing", func() { var debugPrinter *mockDebugPrinter BeforeEach(func() { startFakeTrafficController() }) JustBeforeEach(func() { debugPrinter = newMockDebugPrinter() cnsmr.SetDebugPrinter(debugPrinter) }) It("includes websocket handshake", func() { fakeHandler.Close() cnsmr.TailingLogsWithoutReconnect(appGuid, authToken) var body string Eventually(debugPrinter.PrintInput.Dump).Should(Receive(&body)) Expect(body).To(ContainSubstring("Sec-WebSocket-Version: 13")) }) It("does not include messages sent or received", func() { fakeHandler.InputChan <- marshalMessage(createMessage("hello", 0))