Repository navigation
feat: enable Speakeasy contract testing + exhaustive SDK test suite - #379
Closed
Nelson-PROIA wants to merge 2 commits into
Closed
Nelson-PROIA wants to merge 2 commits into
Nelson-PROIA wants to merge 2 commits into
Conversation
- Enable `generateTests: true` and `testing: enabled: true` in all gen.yaml/workflow.yaml
- Bootstrap arazzo test definitions and generated pytest files for main, Azure, and GCP SDKs
- Add `.genignore` entries to protect hand-written tests from being overwritten
- Add `pytest-xdist` dev dependency for parallel test execution
- Add GitHub Actions workflow for contract tests on PRs
- Disable `persistentEdits` on main SDK (workaround for mockserver incompatibility)
- Fix `prompt_audio_seconds: {}` → `null` in agents arazzo tests (OpenAPI spec bug workaround)
Results: main SDK 230/238 pass (96.6%), Azure 2/3, GCP 0/2 (blocked by path rewriting hook)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
||
| # _build_url produces the HTTPS URL; the WSS conversion happens in connect(). | ||
| # Verify the URL is HTTPS-based (connect() replaces https -> wss) | ||
| assert url.startswith("https://api.mistral.ai") |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High test
| query_params={}, | ||
| ) | ||
|
|
||
| assert url.startswith("https://custom.server.com") |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High test
| content = request.content.decode("utf-8", errors="replace") | ||
| assert "mistral-large-latest" in content | ||
| # The URL may be URL-encoded in form data | ||
| assert "example.com" in content |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High test
Contributor
|
❌ SDK Test Report: all — tests failed |
Contributor
|
@Nelson-PROIA I think we can close. |
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.
Summary
scripts/run_all_tests.shfor running complete test suiteTest Coverage
Changes
tests/unit/- 31 new unit test files covering all SDK endpointspackages/azure/tests/unit/- Azure-specific unit testspackages/gcp/tests/unit/- GCP-specific unit teststests/test_integration.py- Main SDK integration testsscripts/run_all_tests.sh- Script to run all test suites.github/workflows/test_custom_code.yaml- Updated CI to run all testspyproject.toml- Added pytest filterwarnings.genignorefiles - Updated to protect custom test codeTest plan