diff --git a/.circleci/config.yml b/.circleci/config.yml index 91636c5625..e1488a9083 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -500,6 +500,12 @@ jobs: working_directory: ~/project steps: - checkout + - run: + name: Install PostgreSQL + command: | + sudo apt-get update + sudo apt-get install postgresql postgresql-contrib + echo 'export PATH=/usr/lib/postgresql/*/bin:$PATH' >> $BASH_ENV - setup_google_dns - run: name: Show git commit hash diff --git a/tests/proxy_unit_tests/test_db_schema_migration.py b/tests/proxy_unit_tests/test_db_schema_migration.py index 59367aa9cb..47125e86a7 100644 --- a/tests/proxy_unit_tests/test_db_schema_migration.py +++ b/tests/proxy_unit_tests/test_db_schema_migration.py @@ -17,12 +17,12 @@ def schema_setup(postgresql_my): return postgresql_my -def test_schema_migration_check(schema_setup): +def test_aaaasschema_migration_check(schema_setup, monkeypatch): """Test to check if schema requires migration""" # Set test database URL test_db_url = f"postgresql://{schema_setup.info.user}:@{schema_setup.info.host}:{schema_setup.info.port}/{schema_setup.info.dbname}" # test_db_url = "postgresql://neondb_owner:npg_JiZPS0DAhRn4@ep-delicate-wave-a55cvbuc.us-east-2.aws.neon.tech/neondb?sslmode=require" - os.environ["DATABASE_URL"] = test_db_url + monkeypatch.setenv("DATABASE_URL", test_db_url) deploy_dir = Path("./deploy") source_migrations_dir = deploy_dir / "migrations" diff --git a/tests/proxy_unit_tests/test_key_generate_prisma.py b/tests/proxy_unit_tests/test_key_generate_prisma.py index f922b2c27f..bbfa5b1c11 100644 --- a/tests/proxy_unit_tests/test_key_generate_prisma.py +++ b/tests/proxy_unit_tests/test_key_generate_prisma.py @@ -3286,6 +3286,7 @@ async def test_aadmin_only_routes(prisma_client): only an admin should be able to access admin only routes """ litellm.set_verbose = True + print(f"os.getenv('DATABASE_URL')={os.getenv('DATABASE_URL')}") setattr(litellm.proxy.proxy_server, "prisma_client", prisma_client) setattr(litellm.proxy.proxy_server, "master_key", "sk-1234") await litellm.proxy.proxy_server.prisma_client.connect() @@ -3882,6 +3883,7 @@ async def test_get_paginated_teams(prisma_client): @pytest.mark.asyncio +@pytest.mark.flaky(reruns=3) @pytest.mark.parametrize("entity_type", ["key", "user", "team"]) async def test_reset_budget_job(prisma_client, entity_type): """