Pull requests / #3255
#3255 [Other] Terminal tests: pass on Linux desktops and in a checkout with run configs
open · @toel1234 · 0 comentarios · En GitHub
Setup & installServer & APIWindowsLinux
Descripción
## Problem and result `python -m pytest tests/terminal` had five failures on Ubuntu caused by the tests, not by the code. After this PR they pass on Linux. The Windows assertions are unchanged. - **discovery** (2): the tests wrote the command-line settings file to `%APPDATA%/Strata/settings.json`. Linux reads `$XDG_CONFIG_HOME/strata/settings.json`. A third test passed on Linux only because it wrote to that unread file. All three now use `discovery.own_settings_file()`. - **discovery** (1): `Catalog` looks "here" in the folder it runs from, this checkout. A developer checkout that holds its own `strata-*.json` (an install from source) beat the mocked app install. The test points "here" at its temporary folder. - **docker**: `docker/smoke-test.sh` starts `#!/bin/bash` and uses process substitution; it was parsed with `sh`, which is dash on Debian/Ubuntu (`Syntax error: redirection unexpected`). Scripts with a bash shebang are now parsed with bash; the image's sh scripts are still parsed with sh. - **launch TUI**: since d2a38c9e the Linux cloudflared hint is long enough that "quick tunnel" wraps onto two rows. Whitespace is collapsed before the check. - **private files**: on POSIX `is_unshared()` is documented as the same check as `is_private()`, so a fresh file under a normal 0002/0022 umask is not unshared. The POSIX branch now asserts the two agree. ## Related discussion none. Test-only change. ## Approach Test files only: `tests/terminal/test_discovery.py`, `test_docker_files.py`, `test_launch_tui.py`, `test_private_files.py`. No product code. ## Validation **Passed:** - Ubuntu, Python 3.12.3, venv with `requirements.txt` and `requirements-monitor.txt`: the four files give 98 passed, 9 skipped. - Full `python -m pytest tests/terminal -q`, this branch with the procs fix (#3254) merged, in a checkout with a `strata-*.json` at the root: 852 passed, 17 skipped, 0 failed. - Same-day clean `main` e88ee39d baseline: 6 failed (the five here plus the procs one), 846 passed, 17 skipped. **Failed:** none observed. **Not run:** - Windows and macOS: not available. The Windows-only assertions were left as they were. ## Limits Note for anyone running the suite: a venv without `requirements.txt` makes the 7 lifecycle tests and the runtime test fail with "the server exited with 5 before it was ready" (missing `requests`, Pillow). That is not changed here. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
En el sitio
Enlaces a install, modelos, releases.