mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 12:52:24 +03:00
Enable/Disable internal metrics (#2899)
Basically enables us to use `test.WithAllDatabases` when testing internal HTTP APIs, as this would otherwise result in Prometheus complaining about already registered metric names.
This commit is contained in:
parent
b65f89e61e
commit
e245a26f6b
20 changed files with 164 additions and 154 deletions
|
@ -144,7 +144,7 @@ func TestQueryProfile(t *testing.T) {
|
|||
|
||||
t.Run("HTTP API", func(t *testing.T) {
|
||||
router := mux.NewRouter().PathPrefix(httputil.InternalPathPrefix).Subrouter()
|
||||
userapi.AddInternalRoutes(router, userAPI)
|
||||
userapi.AddInternalRoutes(router, userAPI, false)
|
||||
apiURL, cancel := test.ListenAndServe(t, router, false)
|
||||
defer cancel()
|
||||
httpAPI, err := inthttp.NewUserAPIClient(apiURL, &http.Client{})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue