From 1ed224d48166e31a0f2440769f38efa15045a998 Mon Sep 17 00:00:00 2001 From: Swifty Date: Fri, 17 Oct 2025 11:12:00 +0200 Subject: [PATCH] simplify test and add reset-db make command --- autogpt_platform/Makefile | 9 ++++++++- autogpt_platform/backend/test/test_data_creator.py | 5 +---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/autogpt_platform/Makefile b/autogpt_platform/Makefile index fde25ac136..8b4732edd2 100644 --- a/autogpt_platform/Makefile +++ b/autogpt_platform/Makefile @@ -8,6 +8,11 @@ start-core: stop-core: docker compose stop deps +reset-db: + rm -rf db/docker/volumes/db/data + cd backend && poetry run prisma migrate deploy + cd backend && poetry run prisma generate + # View logs for core services logs-core: docker compose logs -f deps @@ -43,8 +48,10 @@ help: @echo "Targets:" @echo " start-core - Start just the core services (Supabase, Redis, RabbitMQ) in background" @echo " stop-core - Stop the core services" + @echo " reset-db - Reset the database by deleting the volume" @echo " logs-core - Tail the logs for core services" @echo " format - Format & lint backend (Python) and frontend (TypeScript) code" @echo " migrate - Run backend database migrations" @echo " run-backend - Run the backend FastAPI server" - @echo " run-frontend - Run the frontend Next.js development server" \ No newline at end of file + @echo " run-frontend - Run the frontend Next.js development server" + @echo " test-data - Run the test data creator" \ No newline at end of file diff --git a/autogpt_platform/backend/test/test_data_creator.py b/autogpt_platform/backend/test/test_data_creator.py index 36f42fda82..befb1dcacd 100644 --- a/autogpt_platform/backend/test/test_data_creator.py +++ b/autogpt_platform/backend/test/test_data_creator.py @@ -571,10 +571,7 @@ async def main(): @pytest.mark.asyncio @pytest.mark.integration async def test_main_function_runs_without_errors(): - try: - await main() - except Exception as e: - assert False, f"main() raised an exception: {e}" + await main() if __name__ == "__main__":