ci: add pytest to requirements.txt - #229
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
added 4 commits
August 22, 2026 15:08
…ing tests - CI failed because pytest was missing from requirements.txt and the new Socket.IO auth rejected flask_socketio test clients and Playwright pages. Adds NMAPUI_SOCKET_AUTH_DISABLED env bypass, set in the browser-regression fixture and CI workflow. - Repairs 4 pre-existing test failures in test_reporting_modules.py: fixed March 2026 timestamps fell outside max_days=30 as real time passed. Tests now compute recent timestamps at module load. Failures drop 21 -> 17.
- test_admin_scripts: use sys.executable instead of repo .venv path - CI unit job: install xsltproc for the representative report fixture test - test_reporting_modules: fix remaining stale-timestamp JSON quoting so newer scans sort correctly (all 5 pre-existing failures in this file are now green; total baseline failures 21 -> 16)
CDN scripts (tailwind/socket.io CDN) keep the network busy past the default 30s goto timeout in CI environments; domcontentloaded plus the existing element waits are sufficient and deterministic.
…strap templates/index.html connected without the loopback token so every socket was rejected once #210 landed; it also had a startup race where DOMContentLoaded handlers ran before the async socket existed (crash: 'Cannot read properties of undefined (reading on)'). Now both runtimes wait for socket connect before wiring modules. Verified headless: zero page errors, socket connects, reports list populates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CI has never been green on this repo (every run since June failed). This PR makes CI actually runnable and fixes real test debt discovered along the way.
Fixes
pytest: command not foundNMAPUI_SOCKET_AUTH_DISABLED=1) - the token check rejected flask_socketio test clients and browser pages; set in the browser-regression fixture and CIRemaining known-red (pre-existing, out of scope)