mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-07 00:24:03 +00:00
(ci/cd) undo change from PR 1464
This commit is contained in:
@@ -1330,11 +1330,7 @@ async def startup_event():
|
||||
verbose_proxy_logger.debug(f"custom_db_client connecting - {custom_db_client}")
|
||||
await custom_db_client.connect()
|
||||
|
||||
if prisma_client is not None:
|
||||
if master_key is None:
|
||||
raise ValueError(
|
||||
"Using Proxy Auth, but Master Key not set, please set `LITELLM_MASTER_KEY` in your environment or `master_key` in your config.yaml"
|
||||
)
|
||||
if prisma_client is not None and master_key is not None:
|
||||
# add master key to db
|
||||
await generate_key_helper_fn(
|
||||
duration=None, models=[], aliases={}, config={}, spend=0, token=master_key
|
||||
@@ -1342,11 +1338,7 @@ async def startup_event():
|
||||
verbose_proxy_logger.debug(
|
||||
f"custom_db_client client - Inserting master key {custom_db_client}. Master_key: {master_key}"
|
||||
)
|
||||
if custom_db_client is not None:
|
||||
if master_key is None:
|
||||
raise ValueError(
|
||||
"Using Proxy Auth, but Master Key not set, please set `LITELLM_MASTER_KEY` in your environment or `master_key` in your config.yaml"
|
||||
)
|
||||
if custom_db_client is not None and master_key is not None:
|
||||
# add master key to db
|
||||
await generate_key_helper_fn(
|
||||
duration=None, models=[], aliases={}, config={}, spend=0, token=master_key
|
||||
|
||||
@@ -24,14 +24,7 @@ from litellm.proxy.proxy_server import (
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def cleanup_router_config():
|
||||
from litellm.proxy.proxy_server import cleanup_router_config_variables
|
||||
|
||||
cleanup_router_config_variables()
|
||||
|
||||
|
||||
def test_proxy_gunicorn_startup_direct_config(cleanup_router_config):
|
||||
def test_proxy_gunicorn_startup_direct_config():
|
||||
"""
|
||||
gunicorn startup requires the config to be passed in via environment variables
|
||||
|
||||
@@ -53,7 +46,7 @@ def test_proxy_gunicorn_startup_direct_config(cleanup_router_config):
|
||||
pytest.fail(f"An exception occurred - {str(e)}")
|
||||
|
||||
|
||||
def test_proxy_gunicorn_startup_config_dict(cleanup_router_config):
|
||||
def test_proxy_gunicorn_startup_config_dict():
|
||||
try:
|
||||
filepath = os.path.dirname(os.path.abspath(__file__))
|
||||
# test with worker_config = config yaml
|
||||
|
||||
Reference in New Issue
Block a user