(t *testing.T)
| 149 | } |
| 150 | |
| 151 | func TestPrinter_Panics(t *testing.T) { |
| 152 | t.Run("CompactPrinter", func(t *testing.T) { |
| 153 | printer := NewCompactPrinter(t) |
| 154 | |
| 155 | assert.NotPanics(t, func() { |
| 156 | printer.Request(&http.Request{}) |
| 157 | }) |
| 158 | assert.NotPanics(t, func() { |
| 159 | printer.Response(&http.Response{ |
| 160 | Body: failingReader{}, |
| 161 | }, 0) |
| 162 | }) |
| 163 | }) |
| 164 | |
| 165 | t.Run("CurlPrinter", func(t *testing.T) { |
| 166 | printer := NewCurlPrinter(t) |
| 167 | |
| 168 | assert.Panics(t, func() { |
| 169 | printer.Request(&http.Request{}) |
| 170 | }) |
| 171 | assert.NotPanics(t, func() { |
| 172 | printer.Response(&http.Response{ |
| 173 | Body: failingReader{}, |
| 174 | }, 0) |
| 175 | }) |
| 176 | }) |
| 177 | |
| 178 | t.Run("DebugPrinter", func(t *testing.T) { |
| 179 | printer := NewDebugPrinter(t, true) |
| 180 | |
| 181 | assert.Panics(t, func() { |
| 182 | printer.Request(&http.Request{ |
| 183 | Body: failingReader{}, |
| 184 | }) |
| 185 | }) |
| 186 | assert.Panics(t, func() { |
| 187 | printer.Response(&http.Response{ |
| 188 | Body: failingReader{}, |
| 189 | }, 0) |
| 190 | }) |
| 191 | }) |
| 192 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…