18 lines
354 B
Go
18 lines
354 B
Go
package v1
|
|
|
|
import (
|
|
"net/http"
|
|
"testing"
|
|
|
|
"github.com/go-chi/chi/v5"
|
|
)
|
|
|
|
func TestRoutesRemoteHead(t *testing.T) {
|
|
r := (&ProxyHandler{}).Routes()
|
|
for _, m := range []string{http.MethodGet, http.MethodHead} {
|
|
if !r.Match(chi.NewRouteContext(), m, "/remote/myremote/some/path") {
|
|
t.Errorf("%s /remote/myremote/some/path not routed", m)
|
|
}
|
|
}
|
|
}
|