mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 23:20:56 +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
|
working-directory: ./7project/backend
|
||||||
|
|
||||||
- name: Run tests with pytest
|
- name: Run tests with pytest
|
||||||
|
env:
|
||||||
|
PYTEST_RUN_CONFIG: "True"
|
||||||
run: pytest
|
run: pytest
|
||||||
working-directory: ./7project/backend
|
working-directory: ./7project/backend
|
||||||
@@ -51,16 +51,16 @@ fastApi.add_middleware(
|
|||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
)
|
)
|
||||||
|
|
||||||
prometheus = Instrumentator().instrument(fastApi)
|
|
||||||
|
|
||||||
# Register custom metrics
|
if not os.getenv("PYTEST_RUN_CONFIG"):
|
||||||
prometheus.add(number_of_users()).add(number_of_transactions())
|
prometheus = Instrumentator().instrument(fastApi)
|
||||||
|
# Register custom metrics
|
||||||
prometheus.expose(
|
prometheus.add(number_of_users()).add(number_of_transactions())
|
||||||
fastApi,
|
prometheus.expose(
|
||||||
endpoint="/metrics",
|
fastApi,
|
||||||
include_in_schema=True,
|
endpoint="/metrics",
|
||||||
)
|
include_in_schema=True,
|
||||||
|
)
|
||||||
|
|
||||||
fastApi.include_router(auth_router)
|
fastApi.include_router(auth_router)
|
||||||
fastApi.include_router(categories_router)
|
fastApi.include_router(categories_router)
|
||||||
|
|||||||
Reference in New Issue
Block a user