mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
Compare commits
4 Commits
merge/emai
...
c53e314b2a
| Author | SHA1 | Date | |
|---|---|---|---|
| c53e314b2a | |||
| c0bc44622f | |||
| 3d31ff4631 | |||
| dc7ce9e6a1 |
2
.github/workflows/run-tests.yml
vendored
2
.github/workflows/run-tests.yml
vendored
@@ -57,5 +57,7 @@ jobs:
|
||||
working-directory: ./7project/backend
|
||||
|
||||
- name: Run tests with pytest
|
||||
env:
|
||||
PYTEST_RUN_CONFIG: "True"
|
||||
run: pytest
|
||||
working-directory: ./7project/backend
|
||||
@@ -51,16 +51,16 @@ fastApi.add_middleware(
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
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,
|
||||
)
|
||||
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