Drop vetiver test baggage; mock system-caches CLI test#809
Draft
edavidaja wants to merge 9 commits into
Draft
Conversation
…med with-connect API
|
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.
What & why
Removes rsconnect-python's vetiver-specific test baggage and converts its own
system cachesintegration test from a live-Connect test into an offlinehttpretty-mocked unit test. rsconnect no longer maintains a Connect-in-Docker harness for testing.Pairs with rstudio/vetiver-python#242, which moves vetiver's own Connect integration tests fully into the vetiver repo (on
with-connect).Design and implementation plan are included under
docs/superpowers/.Key insight
rsconnect system caches list/deleteis a thin wrapper overGET/DELETE v1/system/caches/runtime. Connect's permission enforcement on that endpoint (admin allowed; publisher/viewer/anon → 403) is already covered upstream inconnect's API suite (test/api/tests/test_system_caches_runtime.py, all four roles). 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, withhttpretty(the repo's standard mocking) — and rely on upstream for enforcement. Net result: no live Connect / nowith-connectneeded here, and the test now runs on every PR instead of nightly.Changes
tests/test_main_system_caches.py— rewritten as offlinehttprettytests:listhappy path (exit 0 + JSON round-trip),deletehappy 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--vetiveroption/marker plumbing and thevetiver-testingruff exclude; deletedtests/test_vetiver_pins.py..github/workflows/main.yml— deleted thetest-dev-connectjob (nothing live to run anymore).vetiver-testing/, rootdocker-compose.yml, and thedev/dev-stopJustfilerecipes.rsconnect/actions.py— relabeled thedeploy_python_fastapi/deploy_appblock 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
test_quickstart.py[shiny]failures are pre-existing and unrelated to this change.uv-tooling-modernization(its file edits target that branch'sJustfile/main.yml/conftest.py), notmain.deploy_app'svalidate_*calls to thebundle.pyversions: 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.