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

Conditionally exclude samples (live-only tests) #7416

Closed
heaths opened this issue Aug 28, 2019 · 0 comments · Fixed by #7430
Closed

Conditionally exclude samples (live-only tests) #7416

heaths opened this issue Aug 28, 2019 · 0 comments · Fixed by #7430
Assignees
Labels
Client This issue points to a problem in the data-plane of the library.

Comments

@heaths
Copy link
Member

heaths commented Aug 28, 2019

If running tests in playback mode, at least in the KeyVault client tests all the *.Samples fail because they are designed - as suitable samples - to run only against live resources. To make testing easier (i.e. can simply run all tests, e.g. Ctrl+R, A), we could define an attribute that implements ITestAction to conditionally ignore those tests rather than fail. Failing the tests has the downstream disadvantage of not being able to rerun failed tests when fixing issues in subjects under test. Perhaps we could even extend or otherwise redefine the CategoryAttribute to provide both the categories (e.g. "Live" and "Recorded") and call Assert.Ignore as needed.

@heaths heaths added the Client This issue points to a problem in the data-plane of the library. label Aug 28, 2019
@heaths heaths self-assigned this Aug 29, 2019
heaths added a commit to heaths/azure-sdk-for-net that referenced this issue Aug 29, 2019
heaths added a commit that referenced this issue Sep 3, 2019
Fixes #7416

* Ignore live-only tests when in Playback or Record modes
* Attribute to other live-only tests throughout repo
JoshLove-msft pushed a commit to JoshLove-msft/azure-sdk-for-net that referenced this issue Sep 10, 2019
Fixes Azure#7416

* Ignore live-only tests when in Playback or Record modes
* Attribute to other live-only tests throughout repo
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant