Files
artifactapi/internal/api/v1/routes_test.go
T
unkin-agent 3dd4acd233
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
Add HEAD route for remotes matching GET headers
2026-10-17 12:40:33 +11:00

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)
}
}
}