Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically record and play back test recordings #2033

Merged
merged 8 commits into from
Feb 3, 2025

Conversation

heaths
Copy link
Member

@heaths heaths commented Jan 29, 2025

Resolves #1876

LarryOsterman
LarryOsterman previously approved these changes Jan 29, 2025
sdk/core/azure_core_test/Cargo.toml Show resolved Hide resolved
sdk/core/azure_core_test/src/lib.rs Show resolved Hide resolved
sdk/core/azure_core_test/src/recorded.rs Outdated Show resolved Hide resolved
sdk/core/azure_core_test/src/recording.rs Outdated Show resolved Hide resolved
@heaths
Copy link
Member Author

heaths commented Jan 30, 2025

@LarryOsterman I was touching yer' stuff. Shouldn't matter, but it's easier all around to require recorded/live tests return a Result<T, E> including type defs like azure_core::Result<T>.

@heaths heaths dismissed LarryOsterman’s stale review January 30, 2025 02:58

As this is a draft, an early review is great but I don't recommend signing off just yet. More to come.

@heaths heaths force-pushed the issue1876 branch 4 times, most recently from b9ff17d to 18ffb68 Compare February 1, 2025 00:18
@heaths heaths marked this pull request as ready for review February 1, 2025 00:18
This is simpler to support in the `#[recorded::test]` macro and sets a good precedent we want to show users anyway instead of `unwrap()` or `expect()`.
The default single-threaded async runtime runner was deadlocking in `Recording::drop()`. I opened Azure#2049 to revisit this but I don't foresee any problem. We already don't support test-proxy on wasm32 and our mix of agents we do test on support multi-threaded async runtimes just fine.
We need to sanitize the headers later, but easier just to sanitize them all right now. This is still better than before which only showed how many headers were in the request.
.vscode/cspell.json Outdated Show resolved Hide resolved
sdk/core/azure_core_test/README.md Outdated Show resolved Hide resolved
sdk/core/azure_core_test/src/lib.rs Show resolved Hide resolved
sdk/core/azure_core_test/src/lib.rs Outdated Show resolved Hide resolved
sdk/core/azure_core_test/src/lib.rs Show resolved Hide resolved
sdk/core/azure_core_test/src/proxy/client.rs Show resolved Hide resolved
sdk/keyvault/test-resources.bicep Show resolved Hide resolved
@heaths heaths enabled auto-merge (squash) February 3, 2025 19:34
@heaths heaths merged commit 719003d into Azure:main Feb 3, 2025
13 checks passed
@heaths heaths deleted the issue1876 branch February 3, 2025 20:08
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.

Create transport for Test Proxy
3 participants