forked from phoenix/litellm-mirror
build(config.yml): add /key/generate load test
This commit is contained in:
parent
1becc7a4cf
commit
21d951f279
2 changed files with 20 additions and 4 deletions
|
@ -131,10 +131,26 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: Wait for app to be ready
|
name: Wait for app to be ready
|
||||||
command: dockerize -wait http://localhost:4000 -timeout 1m
|
command: dockerize -wait http://localhost:4000 -timeout 1m
|
||||||
- run:
|
- run:
|
||||||
name: Test the application
|
name: Test the application
|
||||||
command: curl -s "http://localhost:4000/health/readiness"
|
command: |
|
||||||
|
status_codes=()
|
||||||
|
for i in {1..10}; do
|
||||||
|
status=$(curl --location --request 'POST' 'http://0.0.0.0:4000/key/generate' \
|
||||||
|
--header 'Authorization: Bearer sk-1234' \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{"models": ["azure-models"], "aliases": {"mistral-7b": "gpt-3.5-turbo"}, "duration": null}' \
|
||||||
|
--silent --output /dev/null --write-out '%{http_code}\n') &
|
||||||
|
status_codes+=($status)
|
||||||
|
done
|
||||||
|
wait
|
||||||
|
for status in "${status_codes[@]}"; do
|
||||||
|
if [[ "$status" -ne 200 ]]; then
|
||||||
|
echo "A request did not return a 200 status code: $status"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "All requests returned a 200 status code."
|
||||||
|
|
||||||
publish_to_pypi:
|
publish_to_pypi:
|
||||||
docker:
|
docker:
|
||||||
|
|
|
@ -23,7 +23,7 @@ litellm_settings:
|
||||||
set_verbose: True
|
set_verbose: True
|
||||||
|
|
||||||
general_settings:
|
general_settings:
|
||||||
# master_key: sk-1234 # [OPTIONAL] Only use this if you to require all calls to contain this key (Authorization: Bearer sk-1234)
|
master_key: sk-1234 # [OPTIONAL] Only use this if you to require all calls to contain this key (Authorization: Bearer sk-1234)
|
||||||
# database_url: "postgresql://<user>:<password>@<host>:<port>/<dbname>" # [OPTIONAL] use for token-based auth to proxy
|
# database_url: "postgresql://<user>:<password>@<host>:<port>/<dbname>" # [OPTIONAL] use for token-based auth to proxy
|
||||||
|
|
||||||
environment_variables:
|
environment_variables:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue