refactor: move tests/client-sdk to tests/api (#1376)

This PR moves the client-sdk tests to the api directory to better
reflect their purpose and improve code organization.
This commit is contained in:
Ashwin Bharambe 2025-03-03 17:28:12 -08:00 committed by GitHub
parent c3155cb1bc
commit 5736c7d682
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 13 additions and 13 deletions

31
tests/api/README.md Normal file
View file

@ -0,0 +1,31 @@
# Llama Stack Integration Tests
You can run llama stack integration tests on either a Llama Stack Library or a Llama Stack endpoint.
To test on a Llama Stack library with certain configuration, run
```bash
LLAMA_STACK_CONFIG=./llama_stack/templates/cerebras/run.yaml pytest -s -v tests/api/inference/
```
or just the template name
```bash
LLAMA_STACK_CONFIG=together pytest -s -v tests/api/inference/
```
To test on a Llama Stack endpoint, run
```bash
LLAMA_STACK_BASE_URL=http://localhost:8089 pytest -s -v tests/api/inference
```
## Report Generation
To generate a report, run with `--report` option
```bash
LLAMA_STACK_CONFIG=together pytest -s -v report.md tests/api/ --report
```
## Common options
Depending on the API, there are custom options enabled
- For tests in `inference/` and `agents/, we support `--inference-model` (to be used in text inference tests) and `--vision-inference-model` (only used in image inference tests) overrides
- For tests in `vector_io/`, we support `--embedding-model` override
- For tests in `safety/`, we support `--safety-shield` override
- The param can be `--report` or `--report <path>`
If path is not provided, we do a best effort to infer based on the config / template name. For url endpoints, path is required.