llama-stack-mirror/tests
ehhuang 386c806c70
test: introduce recordable mocks for Agent tests (#1268)
Summary:

Agent tests shouldn't need to run inference and tools calls repeatedly.
This PR introduces a way to record inference/tool calls and reuse them
in subsequent test runs, which makes the tests more reliable and saves
costs.

Test Plan:
Run when there's no recorded calls created (fails):
```
LLAMA_STACK_CONFIG=fireworks pytest -s -v tests/client-sdk/agents/test_agents.py --safety-shield meta-llama/Llama-Guard-3-8B
```

Run when `--record-responses` to record calls:
```
LLAMA_STACK_CONFIG=fireworks pytest -s -v tests/client-sdk/agents/test_agents.py --safety-shield meta-llama/Llama-Guard-3-8B --record-responses
```

Run without `--record-responses` again (succeeds):
```
LLAMA_STACK_CONFIG=fireworks pytest -s -v tests/client-sdk/agents/test_agents.py --safety-shield meta-llama/Llama-Guard-3-8B
```
2025-03-03 14:48:32 -08:00
..
client-sdk test: introduce recordable mocks for Agent tests (#1268) 2025-03-03 14:48:32 -08:00
test_logcat.py feat: add a configurable category-based logger (#1352) 2025-03-02 18:51:14 -08:00
test_replace_env_vars.py feat: allow conditionally enabling providers in run.yaml (#1321) 2025-03-01 11:19:14 -08:00