[wasm][testing] Avoid using crypto in WASM HTTP unit tests#53925
[wasm][testing] Avoid using crypto in WASM HTTP unit tests#53925pavelsavara merged 4 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsOn WASM platform POST/PUT tests are blocked by current lack of crypto in WASM.
|
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsOn WASM platform POST/PUT tests are blocked by current lack of crypto in WASM.
|
4d4915e to
939e7cf
Compare
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs
Outdated
Show resolved
Hide resolved
...ibraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/VerifyUploadHandler.cs
Outdated
Show resolved
Hide resolved
radical
left a comment
There was a problem hiding this comment.
Looks good, just a couple of comments.
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs
Outdated
Show resolved
Hide resolved
...ibraries/Common/tests/System/Net/Prerequisites/NetCoreServer/Handlers/VerifyUploadHandler.cs
Outdated
Show resolved
Hide resolved
| // Repeat call. | ||
| content = new StringContent(data, Encoding.UTF8); | ||
| content.Headers.ContentMD5 = TestHelper.ComputeMD5Hash(data); | ||
| if (PlatformDetection.IsBrowser) |
There was a problem hiding this comment.
Should you have this extracted to a method to reduce copy&paste? :-)
On WASM platform existing POST/PUT tests are blocked by current lack of crypto in WASM.
By skipping content checksum validation in the tests for Browser, we could enable about 130 tests of other HTTP features.
Content-MD5-Skipheader instead ofContent-MD5header from browserContent-MD5-Skipis presentContent-MD5response validationSendAsync_SendRequestUsingMethodToEchoServerWithContent_Successmore granular active issue [wasm][HTTP] TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body #53591SendAsync_GetWithValidHostHeader_Success