Skip to content

test: add optional live controller smoke tests - #26

Open
tnware wants to merge 1 commit into
mainfrom
test/live-controller-smoke
Open

tnware wants to merge 1 commit into
mainfrom
test/live-controller-smoke

Conversation

@tnware

@tnware tnware commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add opt-in live smoke tests for authenticating to a real UniFi controller and listing sites.
  • Add an optional read-only device listing smoke test gated by UNIFI_SITE_NAME.
  • Document the required environment variables and register a live pytest marker.

Why

The existing suite is useful for unit/regression coverage, but it does not prove the client still works against a live controller. These tests stay skipped in normal CI unless credentials are explicitly provided, while giving maintainers a repeatable real-controller check before releases or risky auth/API changes.

Test Plan

  • python -m pytest tests/test_live_controller.py -q — passes with 2 skipped when no live controller env vars are configured.
  • python -m pytest -q — 14 passed, 2 skipped.
  • ruff check . — passed.
  • python -m build — passed.
  • twine check dist/* — passed.
  • sphinx-build -E -W -b html docs docs/_build/html — passed.
  • git diff --check — passed.

Note: no live UniFi controller credentials were configured in this environment, so the new live tests were validated only for safe skip behavior here.

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@tnware, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 30 minutes and 20 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 107018ee-b2a3-41fe-820d-9bcf3406efb0

📥 Commits

Reviewing files that changed from the base of the PR and between b7d6021 and 75ca1a9.

📒 Files selected for processing (4)
  • .env.example
  • README.md
  • pyproject.toml
  • tests/test_live_controller.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/live-controller-smoke

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant