Skip to content

test: add remote disk route coverage (#225) - #246

Open
Milan-CSE wants to merge 3 commits into
ChristianHandy:mainfrom
Milan-CSE:test/remote-disk-routes
Open

Milan-CSE wants to merge 3 commits into
ChristianHandy:mainfrom
Milan-CSE:test/remote-disk-routes

Conversation

@Milan-CSE

Copy link
Copy Markdown
Contributor

What changes for users

Adds unit tests for the remote disk plugin's SSH helpers and API routes (addons/remote_disk_plugin.py), covering remote command execution, disk listing, SMART information, disk formatting, SMART tests, and route permissions with mocked SSH interactions.

Closes #225

How it was tested

  • python -m pytest tests/test_remote_disk_routes.py tests/test_remote_disk_plugin.py -q: 54 passed
  • python -m coverage run -m pytest -q tests/test_remote_disk_routes.py tests/test_remote_disk_plugin.py && python -m coverage report --include=addons/remote_disk_plugin.py: 98.2% coverage
  • ruff check .: passed
  • python -m pytest tests/test_license_headers.py: passed
  • python scripts/pr_threat_scan.py upstream/main HEAD: passed

Checklist

  • Tests added or updated where applicable.
  • python -m pytest -q and ruff check . pass; coverage has not dropped.
  • Every commit is signed off with git commit -s, using the commit author's email address (DCO).
  • CHANGELOG.md updated under Unreleased if users notice the change. (N/A: test-only change)
  • User guide updated if a page or setting changed. (N/A)

AI assistance

I reviewed and tested the changes.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 08:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ChristianHandy ChristianHandy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Milan-CSE, ne question: your "AI assistance" section only says "I reviewed and tested the changes". Did you use any AI tools? If not, please change it to "No AI tools were used", otherwise say which ones.

@ChristianHandy ChristianHandy added no changelog Users won't notice this change; the changelog check is skipped requested changes requested changes and removed no changelog Users won't notice this change; the changelog check is skipped labels Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🔴 Not ready to merge

  • Required checks failed: AI assistance.

Commit 59f8d84; updated whenever a check finishes.

What this pull request changes

1 files, +520 / -0 lines.

Area Files Added Deleted
Tests 1 +520 -0
Changed files
  • tests/test_remote_disk_routes.py (added, +520 / -0)

Required checks

Check Result
pytest (Python 3.11) ✅ passed
pytest (Python 3.12) ✅ passed
pytest (Python 3.13) ✅ passed
Analyze (python) ✅ passed
Safe to merge ✅ passed
AI assistance ❌ failed

Other checks: 11 passed, 0 failed, 1 running.

How to fix

  • AI assistance: The pull request declares AI help or looks AI-written (details in the job summary). A maintainer can allow it anyway by commenting /allow-ai 59f8d84 <reason>.

ChristianHandy added a commit that referenced this pull request Oct 23, 2026
## Summary

pip-audit ("Check dependencies for known vulnerabilities") fails the
pytest jobs on every pull request (e.g. #246): brotli 1.2.0 has
PYSEC-2026-4322, fixed in 1.2.1.

## Changes

- `requirements-lock.txt`: brotli 1.2.0 → 1.2.1, regenerated with `uv
pip compile ... --upgrade-package brotli` (no other package changes; the
dev lock has no brotli pin of its own).
- `CHANGELOG.md`: entry under Unreleased → Security.

## Verification

- `pip-audit --require-hashes --disable-pip -r requirements-lock.txt` →
no known vulnerabilities
- same for `requirements-dev-lock.txt` → no known vulnerabilities

## AI assistance

Prepared with Claude Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: ChristianHandy <christianhandy180@gmail.com>
Co-authored-by: ChristianHandy <christianhandy180@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 16:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Copilot AI balanced review requested due to automatic review settings October 26, 2026 22:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requested changes requested changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests for addons/remote_disk_plugin.py (remote disk manager)

3 participants