[PR #3255] [Other] Terminal tests: pass on Linux desktops and in a checkout with run configs #4530

Open
opened 2026-11-07 15:36:52 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3255
Author: @toel1234
Created: 10/19/2026
Status: 🔄 Open

Base: main ← Head: fix/terminal-tests-linux


📝 Commits (1)

  • ad25e97 [Other] Terminal tests: pass on Linux desktops and in a checkout with run configs

📊 Changes

4 files changed (+22 additions, -6 deletions)

View changed files

📝 tests/terminal/test_discovery.py (+12 -3)
📝 tests/terminal/test_docker_files.py (+6 -1)
📝 tests/terminal/test_launch_tui.py (+1 -1)
📝 tests/terminal/test_private_files.py (+3 -1)

📄 Description

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.

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3255 **Author:** [@toel1234](https://github.com/toel1234) **Created:** 10/19/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/terminal-tests-linux` --- ### 📝 Commits (1) - [`ad25e97`](https://github.com/Niko1221/Strata/commit/ad25e97a0cd30b586011b525f78a5b5b92a7ad0f) [Other] Terminal tests: pass on Linux desktops and in a checkout with run configs ### 📊 Changes **4 files changed** (+22 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `tests/terminal/test_discovery.py` (+12 -3) 📝 `tests/terminal/test_docker_files.py` (+6 -1) 📝 `tests/terminal/test_launch_tui.py` (+1 -1) 📝 `tests/terminal/test_private_files.py` (+3 -1) </details> ### 📄 Description ## 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4530
No description provided.