Skip to content

Add the test-proxy client #2000

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

Merged
merged 4 commits into from
Jan 17, 2025
Merged

Add the test-proxy client #2000

merged 4 commits into from
Jan 17, 2025

Conversation

heaths
Copy link
Member

@heaths heaths commented Jan 16, 2025

Resolves #1875. I was unable to generate it from the TypeSpec because we lack support for a few things in the emitter, but I rename (hid as dotfile) the tsp-location.yaml for future use and easy reference for anyone wanting to know how.

Resolves Azure#1875. I was unable to generate it from the TypeSpec because we lack support for a few things in the emitter, but I rename (hid as dotfile) the tsp-location.yaml for future use and easy reference for anyone wanting to know how.
@heaths
Copy link
Member Author

heaths commented Jan 16, 2025

Note that this is only the test-proxy client. I have subsequent tasks to wire everything up but this was enough code - and specific to a single task - that I wanted to get eyes on it. I'll continue on a separate branch and rebase --onto later. Like Go's, thish does not define every single method that test-proxy defines because I don't think we'll need them; however, should we, I'll add them as needed. Think of this more as an MVP with legs.

@heaths heaths requested a review from scbedd January 16, 2025 01:43
Like the rest of the test-proxy, we can't use it on the wasm32 architecture because `Proxy` can't support it. Anything that uses proxy could use a mock, but we already don't compile `#[recorded::test]` tests for wasm32 so there's no point currently.
After talking with @scbedd I made a couple changes to be *practically* correct w.r.t. testing client libraries outside perf testing as corner cases e.g., *requiring* `x-recording-file` when starting recording or playback.
Copy link
Member

@LarryOsterman LarryOsterman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly this looks good, only a couple of small comments.

@heaths heaths merged commit ef31ccf into Azure:main Jan 17, 2025
13 checks passed
@heaths heaths deleted the issue1875 branch January 17, 2025 22:19
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.

Generate Test Proxy client
2 participants