plainHTTPServer serves handler over plain http, and counts the requests it gets.
(t *testing.T, handler http.Handler)
| 13 | // plainHTTPServer serves handler over plain http, and counts the requests it |
| 14 | // gets. |
| 15 | func plainHTTPServer(t *testing.T, handler http.Handler) (*httptest.Server, *int) { |
| 16 | t.Helper() |
| 17 | var hits int |
| 18 | srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| 19 | hits++ |
| 20 | handler.ServeHTTP(w, r) |
| 21 | })) |
| 22 | t.Cleanup(srv.Close) |
| 23 | return srv, &hits |
| 24 | } |
| 25 | |
| 26 | // The service provider sends SOAP LogoutRequests only to an https |
| 27 | // SingleLogoutService, unless AllowInsecureSOAPEndpoints is set. |
no test coverage detected