From 2179b8660cf3dc3c140490eaf3f5e3d3e3d73b5e Mon Sep 17 00:00:00 2001 From: rehanpfmr <111350825+rehanpfmr@users.noreply.github.com> Date: Tue, 27 Aug 2024 13:21:23 +0530 Subject: [PATCH] Adding test for nonHijacker Signed-off-by: rehanpfmr <111350825+rehanpfmr@users.noreply.github.com> --- .../github.com/gorilla/mux/otelmux/test/mux_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/instrumentation/github.com/gorilla/mux/otelmux/test/mux_test.go b/instrumentation/github.com/gorilla/mux/otelmux/test/mux_test.go index 8fe99ebc6d4..e60d04f0068 100644 --- a/instrumentation/github.com/gorilla/mux/otelmux/test/mux_test.go +++ b/instrumentation/github.com/gorilla/mux/otelmux/test/mux_test.go @@ -66,6 +66,10 @@ func (m *mockHijacker) Hijack() (net.Conn, *bufio.ReadWriter, error) { return conn, bufio.NewReadWriter(bufio.NewReader(rw), bufio.NewWriter(rw)), nil } +type mockNonHijacker struct { + http.ResponseWriter +} + func TestRecordingResponseWriterHijack(t *testing.T) { mockWriter := &mockHijacker{httptest.NewRecorder()} recWriter := &recordingResponseWriter{writer: mockWriter}