Skip to content

Commit

Permalink
Exit with non-zero if 1 or more tests failed (#905)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
rdimitrov authored Feb 4, 2025
1 parent 7df4f2f commit 1bba21b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegate/api/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from uuid import UUID

import requests
from codegate.pipeline.base import AlertSeverity
import structlog
from fastapi import APIRouter, Depends, HTTPException, Response
from fastapi.responses import StreamingResponse
Expand All @@ -12,6 +11,7 @@
from codegate import __version__
from codegate.api import v1_models, v1_processing
from codegate.db.connection import AlreadyExistsError, DbReader
from codegate.pipeline.base import AlertSeverity
from codegate.providers import crud as provendcrud
from codegate.workspaces import crud

Expand Down
4 changes: 4 additions & 0 deletions tests/integration/integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ async def main():
)
all_tests_passed = all_tests_passed and provider_tests_passed

# Exit with status code 1 if any tests failed
if not all_tests_passed:
sys.exit(1)


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

0 comments on commit 1bba21b

Please sign in to comment.