Skip to content

[wasm][testing] Avoid using crypto in WASM HTTP unit tests - #53925

Merged
pavelsavara merged 4 commits into
dotnet:mainfrom
pavelsavara:pr_wasm_network_test_avoid_crypto
Jun 10, 2021
Merged

[wasm][testing] Avoid using crypto in WASM HTTP unit tests#53925
pavelsavara merged 4 commits into
dotnet:mainfrom
pavelsavara:pr_wasm_network_test_avoid_crypto

Conversation

@pavelsavara

@pavelsavara pavelsavara commented Jun 9, 2021

Copy link
Copy Markdown
Member

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.

@pavelsavara
pavelsavara requested review from ManickaP and radical June 9, 2021 10:10
@ghost ghost added the area-System.Net.Http label Jun 9, 2021
@ghost

ghost commented Jun 9, 2021

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

On WASM platform POST/PUT tests are blocked by current lack of crypto in WASM.
By skipping content checksum validation for Browser, we could enable about 130 tests of other HTTP features.

Author: pavelsavara
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@pavelsavara pavelsavara added the arch-wasm WebAssembly architecture label Jun 9, 2021
@ghost

ghost commented Jun 9, 2021

Copy link
Copy Markdown

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

On WASM platform POST/PUT tests are blocked by current lack of crypto in WASM.
By skipping content checksum validation for Browser, we could enable about 130 tests of other HTTP features.

Author: pavelsavara
Assignees: -
Labels:

arch-wasm, area-System.Net.Http

Milestone: -

@pavelsavara
pavelsavara force-pushed the pr_wasm_network_test_avoid_crypto branch from 4d4915e to 939e7cf Compare June 9, 2021 16:21

@ManickaP ManickaP left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

Comment thread src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/TestHelper.cs Outdated

@radical radical left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, just a couple of comments.

Comment thread src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs Outdated
@pavelsavara
pavelsavara merged commit 2e2d1fb into dotnet:main Jun 10, 2021
// Repeat call.
content = new StringContent(data, Encoding.UTF8);
content.Headers.ContentMD5 = TestHelper.ComputeMD5Hash(data);
if (PlatformDetection.IsBrowser)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should you have this extracted to a method to reduce copy&paste? :-)

@ghost ghost locked as resolved and limited conversation to collaborators Jul 11, 2021
@karelz karelz added this to the 6.0.0 milestone Jul 15, 2021
@pavelsavara
pavelsavara deleted the pr_wasm_network_test_avoid_crypto branch July 29, 2021 08:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-System.Net.Http

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants