Skip to content

test: replace statusreturner with local HTTP fixtures - #661

Closed
Aasav Badera (aasavbadera) wants to merge 1 commit into
Azure:masterfrom
aasavbadera:aasavbadera/replace-statusreturner-with-local-fixtures
Closed

Aasav Badera (aasavbadera) wants to merge 1 commit into
Azure:masterfrom
aasavbadera:aasavbadera/replace-statusreturner-with-local-fixtures

Conversation

@aasavbadera

Copy link
Copy Markdown
Collaborator

Added

  • A shared loopback HTTP server fixture for 301, 302, 307, and 308 responses, with deterministic server/thread cleanup and restored cache/environment state.
  • Synchronous and asynchronous redirect regression tests using dummy user tokens and assertions that only the query endpoint is requested.

Changed

  • Move active redirect checks from the Azure-dependent E2E suite into client unit tests, removing the need for a deployed Function App or Azure credentials.

Fixed

  • Remove all statusreturner calls, obsolete skipped cloud-path/404 cases, their trusted-host setup, and imports used only by those cases.
  • No production code, dependency manifest, lockfile, or type-baseline changes.

Validation

  • Passed: 66 tests across both client suites; all eight redirect cases also passed after the final response-type assertions.
  • Passed: Ruff lint and formatting for all four modified files.
  • Passed: baseline-aware basedpyright on the changed files, with no new diagnostics; the original repository baseline was preserved.
  • Passed: git diff --check; no remaining tracked statusreturner references.

Using the local virtual environment:

.\.venv\Scripts\python.exe -m pytest -n 0 azure-kusto-data\tests\test_kusto_client.py azure-kusto-data\tests\aio\test_kusto_client.py

The existing uv.lock records workspace version 6.0.3 while the manifests declare 6.0.4, so the normal --locked sync fails before testing. Validation restored locked external dependencies and installed the editable SDKs with their declared requirements; uv pip check passed. The stale lockfile was left unchanged. Live Azure E2E tests were not run.

Share a local redirect server between synchronous and asynchronous client tests, use dummy credentials, and remove live Function App E2E references.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 40145fed-85f7-45a5-814a-2beea3c6a507
@aasavbadera

Copy link
Copy Markdown
Collaborator Author

Superseded by #666: #666. The replacement uses the upstream branch aasavbadera/replace-statusreturner-with-local-fixtures instead of the fork. The source commit (b886fee3e387f3330d6036c4b35310f3f327c575) and code changes are unchanged.

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