Skip to content

Drop vetiver test baggage; mock system-caches CLI test#809

Merged
edavidaja merged 10 commits into
mainfrom
connect-test-simplification
Jul 1, 2026
Merged

Drop vetiver test baggage; mock system-caches CLI test#809
edavidaja merged 10 commits into
mainfrom
connect-test-simplification

Conversation

@edavidaja

@edavidaja edavidaja commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

What & why

Removes rsconnect-python's vetiver-specific test baggage and converts its own system caches integration test from a live-Connect test into an offline httpretty-mocked unit test. rsconnect no longer maintains a Connect-in-Docker harness for testing.

Pairs with rstudio/vetiver-python#243, which moves vetiver's own Connect integration tests fully into the vetiver repo (on with-connect).

Key insight

rsconnect system caches list/delete is a thin wrapper over GET/DELETE v1/system/caches/runtime. Connect's permission enforcement on that endpoint (admin allowed; publisher/viewer/anon → 403) is already covered upstream in connect's API suite. The old test paid for a live Connect + a second non-admin user just to re-test Connect's behavior through the CLI. We instead test only rsconnect's CLI layer — offline, with httpretty (the repo's standard mocking) — and rely on upstream for enforcement. Net result: no live Connect / no with-connect needed here, and the test now runs on every PR instead of nightly.

Changes

  • tests/test_main_system_caches.py — rewritten as offline httpretty tests: list happy path (exit 0 + JSON round-trip), delete happy path (handles the real task-polling flow), required-flag validation (exit 2), and 403 → exit 1 + permission message. allow_net_connect=False.
  • conftest.py / pyproject.toml — removed the --vetiver option/marker plumbing and the vetiver-testing ruff exclude; deleted tests/test_vetiver_pins.py.
  • .github/workflows/main.yml — deleted the test-dev-connect job (nothing live to run anymore).
  • Deleted vetiver-testing/, root docker-compose.yml, and the dev/dev-stop Justfile recipes.
  • rsconnect/actions.py — relabeled the deploy_python_fastapi/deploy_app block comments from "deprecated … will be removed" to "supported compatibility entry point used by vetiver-python" (comments only; the shim is intentionally kept — vetiver still calls it).

Notes

  • Entirely offline — no license/Docker needed to run these tests.
  • Full offline suite: 728 passed. The 4 test_quickstart.py[shiny] failures are pre-existing and unrelated to this change.
  • Based on uv-tooling-modernization (its file edits target that branch's Justfile/main.yml/conftest.py), not main.
  • Deliberately did NOT swap deploy_app's validate_* calls to the bundle.py versions: that changes deploy-path behavior this repo's offline suite can't test (only vetiver's live test exercises it). Deferred to a separately-tested change.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-01 19:37 UTC

@edavidaja edavidaja marked this pull request as ready for review July 1, 2026 15:37
@edavidaja edavidaja requested a review from a team July 1, 2026 15:38
Comment thread tests/test_main_system_caches.py
Base automatically changed from uv-tooling-modernization to main July 1, 2026 19:22
@edavidaja edavidaja force-pushed the connect-test-simplification branch from e3380d0 to 9ccce12 Compare July 1, 2026 19:26
@edavidaja edavidaja enabled auto-merge (squash) July 1, 2026 19:27
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
7601 6317 83% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/actions.py 58% 🟢
TOTAL 58% 🟢

updated for commit: 9ccce12 by action🐍

@edavidaja edavidaja merged commit 1790932 into main Jul 1, 2026
23 checks passed
@edavidaja edavidaja deleted the connect-test-simplification branch July 1, 2026 19:37
@edavidaja edavidaja restored the connect-test-simplification branch July 1, 2026 20:21
@edavidaja edavidaja deleted the connect-test-simplification branch July 1, 2026 20:22
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.

2 participants