b26ed7c3e4
Working copies were stored as /data/working-copies/{repo_id}/{workspace_name}/,
so git clone was forced into a user-named directory. That meant the container
mount basename was the workspace name (e.g. main) instead of the repo name.
- Generate the workspace UUID before cloning and clone into
/data/working-copies/{workspace_id}/ so git creates {repo_name}/ naturally
- Set workspace.path to /data/working-copies/{workspace_id}/{repo_name}/
- Update _migrate_clone_into_workspace() to use the same layout
- _get_repository_mount_name() now prefers workspace.path basename and only
falls back to remote URL / repo.name for legacy repo-only instances
- Update unit tests to assert workspace path basename is used for mounts
Quality gates:
- pytest tests/unit: 219 passed
- ruff: clean on changed files
- mypy: clean on changed files
37 lines
1.1 KiB
Markdown
37 lines
1.1 KiB
Markdown
# apps/api/tests (index)
|
|
dir: apps/api/tests
|
|
|
|
## role
|
|
Provides shared test infrastructure and fixtures for the API application's pytest suite.
|
|
## parent
|
|
index: apps/api/.pi-map.index.md
|
|
map: apps/api/.pi-map.md
|
|
## children
|
|
- apps/api/tests/api
|
|
index: apps/api/tests/api/.pi-map.index.md
|
|
map: apps/api/tests/api/.pi-map.md
|
|
- apps/api/tests/integration
|
|
index: apps/api/tests/integration/.pi-map.index.md
|
|
map: apps/api/tests/integration/.pi-map.md
|
|
- apps/api/tests/services
|
|
index: apps/api/tests/services/.pi-map.index.md
|
|
map: apps/api/tests/services/.pi-map.md
|
|
- apps/api/tests/system
|
|
index: apps/api/tests/system/.pi-map.index.md
|
|
map: apps/api/tests/system/.pi-map.md
|
|
- apps/api/tests/unit
|
|
index: apps/api/tests/unit/.pi-map.index.md
|
|
map: apps/api/tests/unit/.pi-map.md
|
|
## files
|
|
- conftest.py
|
|
## links
|
|
index: apps/api/tests/.pi-map.index.md
|
|
map: apps/api/tests/.pi-map.md
|
|
## workflows
|
|
- change tests behavior
|
|
read: conftest.py
|
|
- explore tests subdirectories
|
|
index: apps/api/tests/api/.pi-map.index.md, apps/api/tests/integration/.pi-map.index.md, apps/api/tests/services/.pi-map.index.md
|
|
## dirty
|
|
-
|