(t *testing.T, handler ProxyHandler, tests []testCase)
| 19 | } |
| 20 | |
| 21 | func tableTest(t *testing.T, |
| 22 | handler ProxyHandler, tests []testCase) { |
| 23 | for _, test := range tests { |
| 24 | src, err := url.Parse(test.in) |
| 25 | assert.NoError(t, err) |
| 26 | |
| 27 | dest, err := handler.Handle(&http.Request{ |
| 28 | URL: src, |
| 29 | }) |
| 30 | assert.NoError(t, err) |
| 31 | test.check(dest) |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | func destMatches(t *testing.T, regex string) func(dest *url.URL) { |
| 36 | return func(dest *url.URL) { |
no test coverage detected