fix(testing): correct REPO_ROOT path calculation for src/ layout

The REPO_ROOT path calculation in api_recorder.py needed an extra .parent
after the src/ migration. Before:
  llama_stack/testing/api_recorder.py -> .parent.parent.parent = repo root

After src/ migration:
  src/llama_stack/testing/api_recorder.py -> .parent.parent.parent = src/

This caused the recording system to look for recordings in src/tests/
instead of tests/, resulting in "Recording not found" errors.

Fixed by adding one more .parent to reach the actual repo root.
This commit is contained in:
Ashwin Bharambe 2025-10-27 11:57:25 -07:00
parent d27c9ebef3
commit b39878c4a3

View file

@ -43,7 +43,7 @@ from llama_stack.core.testing_context import get_test_context, is_debug_mode
CompletionChoice.model_fields["finish_reason"].annotation = Literal["stop", "length", "content_filter"] | None
CompletionChoice.model_rebuild()
REPO_ROOT = Path(__file__).parent.parent.parent
REPO_ROOT = Path(__file__).parent.parent.parent.parent
DEFAULT_STORAGE_DIR = REPO_ROOT / "tests/integration/common"