[PR #1510] [CLOSED] test(setup): the ready-made-engine refusal tests reach the checksum path on any PC #3501

Closed
opened 2026-11-07 14:41:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1510
Author: @victorgabr
Created: 10/8/2026
Status: ❌ Closed

Base: main ← Head: fix/setup-engine-hash-hermetic


📝 Commits (1)

  • 6e50bb2 test(setup): the refusal tests reach the checksum path on any PC

📊 Changes

1 file changed (+12 additions, -4 deletions)

View changed files

📝 tools/test_setup_engine_hash.py (+12 -4)

📄 Description

tools/test_setup_engine_hash.py's WhatARefusalDoesToTheCaller mocked the download and the published digest, but not
the two steps that come before the checksum, so on most PCs the run never reaches the path those two tests are about:

  • get_prebuilt returns at once when this checkout's engine/ holds a locally built engine ("source": "local") -
    which any PC that ever ran ./setup.sh --build has;
  • before downloading it HEADs the release asset over the real network, and no release carries this OS's asset.
    Measured 2026-10-08: HEAD .../releases/latest/download/strata-linux-x64.zip and
    .../download/v0.1.40.3/strata-linux-x64.zip both answer 404, while strata-windows-x64.zip answers 200.

Either way the run stops before verify_engine_archive, prints nothing, and the two tests fail with
AssertionError: SystemExit not raised and 'keeping the engine that is installed' not found in '' - on Linux always,
on Windows on a checkout with a locally built engine.

What changes: the class now points setup.engine_dir at the engine/ folder its own setUp already makes, and mocks
the HEAD; the first-install case goes through that same helper instead of patching two of the four steps. No fixture
versions and no setup.py behaviour are touched.

python tools/test_setup_engine_hash.py     -> Ran 30 tests in 0.021s, OK   (was: FAILED (failures=2))

Offline (0.02 s, no request leaves the process), and it needs no engine/ in the checkout. The other tools/test_setup_*.py
suites are unchanged and green.


🔄 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/1510 **Author:** [@victorgabr](https://github.com/victorgabr) **Created:** 10/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/setup-engine-hash-hermetic` --- ### 📝 Commits (1) - [`6e50bb2`](https://github.com/Niko1221/Strata/commit/6e50bb2c5ae173060c465422256c8381f60648cc) test(setup): the refusal tests reach the checksum path on any PC ### 📊 Changes **1 file changed** (+12 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tools/test_setup_engine_hash.py` (+12 -4) </details> ### 📄 Description `tools/test_setup_engine_hash.py`'s `WhatARefusalDoesToTheCaller` mocked the download and the published digest, but not the two steps that come before the checksum, so on most PCs the run never reaches the path those two tests are about: - `get_prebuilt` returns at once when this checkout's `engine/` holds a locally built engine (`"source": "local"`) - which any PC that ever ran `./setup.sh --build` has; - before downloading it `HEAD`s the release asset over the real network, and no release carries this OS's asset. Measured 2026-10-08: `HEAD .../releases/latest/download/strata-linux-x64.zip` and `.../download/v0.1.40.3/strata-linux-x64.zip` both answer **404**, while `strata-windows-x64.zip` answers **200**. Either way the run stops before `verify_engine_archive`, prints nothing, and the two tests fail with `AssertionError: SystemExit not raised` and `'keeping the engine that is installed' not found in ''` - on Linux always, on Windows on a checkout with a locally built engine. What changes: the class now points `setup.engine_dir` at the `engine/` folder its own `setUp` already makes, and mocks the `HEAD`; the first-install case goes through that same helper instead of patching two of the four steps. No fixture versions and no setup.py behaviour are touched. python tools/test_setup_engine_hash.py -> Ran 30 tests in 0.021s, OK (was: FAILED (failures=2)) Offline (0.02 s, no request leaves the process), and it needs no `engine/` in the checkout. The other `tools/test_setup_*.py` suites are unchanged and green. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:41:55 +07:00
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#3501
No description provided.