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

Unit-testing with track 2 SDK #19580

Closed
prashantrakheja opened this issue Nov 16, 2022 · 3 comments
Closed

Unit-testing with track 2 SDK #19580

prashantrakheja opened this issue Nov 16, 2022 · 3 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@prashantrakheja
Copy link

Hi,

In the latest Azure SDK, there are no interfaces unlike the previous versions, e.g

(https://github.com/Azure/azure-sdk-for-go/blob/v63.4.0/services/preview/eventgrid/mgmt/2021-06-01-preview/eventgrid/eventgridapi/interfaces.go)

These were quite helpful in unit-testing/mocking.

Going forward, what's the recommendation for writing unit-tests for clients that consume the SDK in the absence of these interfaces?

Also, is there a way to inject a mock server while initialising clients with the latest SDK ?

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 16, 2022
@ghost
Copy link

ghost commented Nov 16, 2022

Hi @prashantcfc. Thank you for your feedback and we will look into it soon. Meanwhile, feel free to share your experience using the Azure SDK in this survey.

@lirenhe lirenhe added the Mgmt This issue is related to a management-plane library. label Nov 16, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 16, 2022
@jhendrixMSFT
Copy link
Member

Our current POR is to generate fakes alongside the SDK. This is not an interface-based mock solution like in our previous versions. You can find further info in #16613 which is tracking this work (closing this as duplicate).

@prashantrakheja
Copy link
Author

@jhendrixMSFT any tentative timeline when fakes would be available?

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants