Skip to content

Commit 1bba21b

Browse files
authored
Exit with non-zero if 1 or more tests failed (#905)
* Exit with non-zero if 1 or more tests failed Signed-off-by: Radoslav Dimitrov <[email protected]> * Run make format Signed-off-by: Radoslav Dimitrov <[email protected]> --------- Signed-off-by: Radoslav Dimitrov <[email protected]>
1 parent 7df4f2f commit 1bba21b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/codegate/api/v1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from uuid import UUID
33

44
import requests
5-
from codegate.pipeline.base import AlertSeverity
65
import structlog
76
from fastapi import APIRouter, Depends, HTTPException, Response
87
from fastapi.responses import StreamingResponse
@@ -12,6 +11,7 @@
1211
from codegate import __version__
1312
from codegate.api import v1_models, v1_processing
1413
from codegate.db.connection import AlreadyExistsError, DbReader
14+
from codegate.pipeline.base import AlertSeverity
1515
from codegate.providers import crud as provendcrud
1616
from codegate.workspaces import crud
1717

tests/integration/integration_tests.py

+4
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ async def main():
291291
)
292292
all_tests_passed = all_tests_passed and provider_tests_passed
293293

294+
# Exit with status code 1 if any tests failed
295+
if not all_tests_passed:
296+
sys.exit(1)
297+
294298

295299
if __name__ == "__main__":
296300
asyncio.run(main())

0 commit comments

Comments
 (0)