mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 06:57:47 +01:00
fix(tests): do not include prometheus in test env
This commit is contained in:
@@ -51,16 +51,15 @@ fastApi.add_middleware(
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
prometheus = Instrumentator().instrument(fastApi)
|
||||
|
||||
# Register custom metrics
|
||||
prometheus.add(number_of_users()).add(number_of_transactions())
|
||||
|
||||
prometheus.expose(
|
||||
if not os.getenv("PYTEST_RUN_CONFIG"):
|
||||
prometheus = Instrumentator().instrument(fastApi)
|
||||
# Register custom metrics
|
||||
prometheus.add(number_of_users()).add(number_of_transactions())
|
||||
prometheus.expose(
|
||||
fastApi,
|
||||
endpoint="/metrics",
|
||||
include_in_schema=True,
|
||||
)
|
||||
)
|
||||
|
||||
fastApi.include_router(auth_router)
|
||||
fastApi.include_router(categories_router)
|
||||
|
||||
Reference in New Issue
Block a user