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

Add tests to ComputerVision for full coverage #4388

Closed

Conversation

cthrash
Copy link
Contributor

@cthrash cthrash commented May 30, 2018

The checked in REST spec had a number of problem which were fixed. Tests now cover these cases.
Swagger PR.

Please see related PR regarding HttpRecorder.

Description


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

SDK Generation Guidelines

  • If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
  • The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as the commitid of your swagger spec or link to the swagger spec, used to generate the code.
  • The *.csproj and AssemblyInfo.cs files have been updated with the new version of the SDK.

The HttpRecorder did not correctly play back binary content.  The propsed fix is to introduce
new fields in `RecordEntry` named `IsRequestBodyBinary`/`IsResponseBodyBinary`, and use base64
encoding/decoding when the payload is deemed to be binary.  Currently the test for binary-ness
is a simple MIME type regex match.

Note that this PR includes tests to confirm the new behavior.  It will failed to build without
hacking around the fact that the test code depends on the NuGet-installed Microsoft.Azure.Test.HttpRecorder.dll.
If it is preferable to split the PR so you can update NuGet first without the tests failing, please
let me know.
Test images for forthcoming tests.  Checking in first so they can be reference via URL via githubusercontent.
Tests covering all the API methods.
Go back to the old HttpRecorder for now.  Thumbnail tests are commented out until
it is fixed.
@cthrash
Copy link
Contributor Author

cthrash commented May 30, 2018

meant to exclude httprecorder changes, let me redo this

@cthrash cthrash closed this May 30, 2018
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.

1 participant