MCPcopy Create free account
hub / github.com/cortexproject/cortex / TestCortexReadRoutes

Function TestCortexReadRoutes

cmd/query-tee/main_test.go:10–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestCortexReadRoutes(t *testing.T) {
11 routes := cortexReadRoutes(Config{PathPrefix: ""})
12 for _, r := range routes {
13 assert.True(t, strings.HasPrefix(r.Path, "/api/v1/"))
14 }
15
16 routes = cortexReadRoutes(Config{PathPrefix: "/some/random/prefix///"})
17 for _, r := range routes {
18 assert.True(t, strings.HasPrefix(r.Path, "/some/random/prefix/api/v1/"))
19 }
20}

Callers

nothing calls this directly

Calls 1

cortexReadRoutesFunction · 0.85

Tested by

no test coverage detected