(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func 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 | } |
nothing calls this directly
no test coverage detected