From 2d6d36cd4fb856ae1da91735f38e029b33f4115e Mon Sep 17 00:00:00 2001 From: Brennan Date: Thu, 20 Jan 2022 19:46:23 -0800 Subject: [PATCH 1/8] Fix browser cookie tests to only run with HTTPS (#39665) --- .../FunctionalTests/EchoConnectionHandler.cs | 7 - .../FunctionalTests/ts/HubConnectionTests.ts | 201 +++++++++--------- 2 files changed, 97 insertions(+), 111 deletions(-) diff --git a/src/SignalR/clients/ts/FunctionalTests/EchoConnectionHandler.cs b/src/SignalR/clients/ts/FunctionalTests/EchoConnectionHandler.cs index 8dbdfd28f883..52a7630fc911 100644 --- a/src/SignalR/clients/ts/FunctionalTests/EchoConnectionHandler.cs +++ b/src/SignalR/clients/ts/FunctionalTests/EchoConnectionHandler.cs @@ -4,7 +4,6 @@ using System.Buffers; using System.Threading.Tasks; using Microsoft.AspNetCore.Connections; -using Microsoft.AspNetCore.Http.Connections; namespace FunctionalTests { @@ -12,12 +11,6 @@ public class EchoConnectionHandler : ConnectionHandler { public async override Task OnConnectedAsync(ConnectionContext connection) { - var context = connection.GetHttpContext(); - // The 'withCredentials' tests wont send a cookie for cross-site requests - if (!context.WebSockets.IsWebSocketRequest && !context.Request.Cookies.ContainsKey("testCookie")) - { - return; - } while (true) { diff --git a/src/SignalR/clients/ts/FunctionalTests/ts/HubConnectionTests.ts b/src/SignalR/clients/ts/FunctionalTests/ts/HubConnectionTests.ts index e15b576fae94..aea8004a72b5 100644 --- a/src/SignalR/clients/ts/FunctionalTests/ts/HubConnectionTests.ts +++ b/src/SignalR/clients/ts/FunctionalTests/ts/HubConnectionTests.ts @@ -43,16 +43,17 @@ function getConnectionBuilder(transportType?: HttpTransportType, url?: string, o describe("hubConnection", () => { eachTransportAndProtocolAndHttpClient((transportType, protocol, httpClient) => { describe("using " + protocol.name + " over " + HttpTransportType[transportType] + " transport", () => { - it("can invoke server method and receive result", async (done) => { + it("can invoke server method and receive result", async () => { const message = "你好,世界!"; const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toBeUndefined(); - done(); + closePromise.resolve(); }); await hubConnection.start(); @@ -60,20 +61,21 @@ describe("hubConnection", () => { expect(result).toBe(message); await hubConnection.stop(); - done(); + await closePromise; }); if (shouldRunHttpsTests) { - it("using https, can invoke server method and receive result", async (done) => { + it("using https, can invoke server method and receive result", async () => { const message = "你好,世界!"; const hubConnection = getConnectionBuilder(transportType, TESTHUBENDPOINT_HTTPS_URL, { httpClient }) .withHubProtocol(protocol) .build(); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toBeUndefined(); - done(); + closePromise.resolve(); }); await hubConnection.start(); @@ -81,30 +83,31 @@ describe("hubConnection", () => { expect(result).toBe(message); await hubConnection.stop(); - done(); + await closePromise; }); } - it("can invoke server method non-blocking and not receive result", async (done) => { + it("can invoke server method non-blocking and not receive result", async () => { const message = "你好,世界!"; const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toBe(undefined); - done(); + closePromise.resolve(); }); await hubConnection.start(); await hubConnection.send("Echo", message); await hubConnection.stop(); - done(); + await closePromise; }); - it("can invoke server method structural object and receive structural result", async (done) => { + it("can invoke server method structural object and receive structural result", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); @@ -115,23 +118,26 @@ describe("hubConnection", () => { hubConnection.stop(); }); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toBe(undefined); - done(); + closePromise.resolve(); }); await hubConnection.start(); await hubConnection.send("SendCustomObject", { Name: "test", Value: 42 }); + await closePromise; }); - it("can stream server method and receive result", async (done) => { + it("can stream server method and receive result", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toBe(undefined); - done(); + closePromise.resolve(); }); const received: string[] = []; @@ -149,16 +155,18 @@ describe("hubConnection", () => { received.push(item); }, }); + await closePromise; }); - it("can stream server method and cancel stream", async (done) => { + it("can stream server method and cancel stream", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toBe(undefined); - done(); + closePromise.resolve(); }); hubConnection.on("StreamCanceled", async () => { @@ -178,9 +186,10 @@ describe("hubConnection", () => { }); subscription.dispose(); + await closePromise; }); - it("rethrows an exception from the server when invoking", async (done) => { + it("rethrows an exception from the server when invoking", async () => { const errorMessage = "An unexpected error occurred invoking 'ThrowException' on the server. InvalidOperationException: An error occurred."; const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) @@ -196,10 +205,9 @@ describe("hubConnection", () => { } await hubConnection.stop(); - done(); }); - it("throws an exception when invoking streaming method with invoke", async (done) => { + it("throws an exception when invoking streaming method with invoke", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); @@ -215,10 +223,9 @@ describe("hubConnection", () => { } await hubConnection.stop(); - done(); }); - it("throws an exception when receiving a streaming result for method called with invoke", async (done) => { + it("throws an exception when receiving a streaming result for method called with invoke", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); @@ -234,15 +241,15 @@ describe("hubConnection", () => { } await hubConnection.stop(); - done(); }); - it("rethrows an exception from the server when streaming", async (done) => { + it("rethrows an exception from the server when streaming", async () => { const errorMessage = "An unexpected error occurred invoking 'StreamThrowException' on the server. InvalidOperationException: An error occurred."; const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); + const closePromise = new PromiseSource(); await hubConnection.start(); hubConnection.stream("StreamThrowException", "An error occurred.").subscribe({ async complete() { @@ -252,20 +259,22 @@ describe("hubConnection", () => { async error(err) { expect(err.message).toEqual(errorMessage); await hubConnection.stop(); - done(); + closePromise.resolve(); }, async next() { await hubConnection.stop(); fail(); }, }); + await closePromise; }); - it("throws an exception when invoking hub method with stream", async (done) => { + it("throws an exception when invoking hub method with stream", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); + const closePromise = new PromiseSource(); await hubConnection.start(); hubConnection.stream("Echo", "42").subscribe({ async complete() { @@ -275,16 +284,18 @@ describe("hubConnection", () => { async error(err) { expect(err.message).toEqual("The client attempted to invoke the non-streaming 'Echo' method with a streaming invocation."); await hubConnection.stop(); - done(); + closePromise.resolve(); }, async next() { await hubConnection.stop(); fail(); }, }); + + await closePromise; }); - it("can receive server calls", async (done) => { + it("can receive server calls", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); @@ -308,10 +319,9 @@ describe("hubConnection", () => { expect(receiveMsg).toBe(message); await hubConnection.stop(); - done(); }); - it("can receive server calls without rebinding handler when restarted", async (done) => { + it("can receive server calls without rebinding handler when restarted", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); @@ -326,6 +336,7 @@ describe("hubConnection", () => { let closeCount = 0; let invocationCount = 0; + const closePromise = new PromiseSource(); hubConnection.onclose(async (e) => { expect(e).toBeUndefined(); closeCount += 1; @@ -336,7 +347,7 @@ describe("hubConnection", () => { await hubConnection.stop(); } else { expect(invocationCount).toBe(2); - done(); + closePromise.resolve(); } }); @@ -348,37 +359,41 @@ describe("hubConnection", () => { await hubConnection.start(); await hubConnection.invoke("InvokeWithString", message); await hubConnection.stop(); + await closePromise; }); - it("closed with error or start fails if hub cannot be created", async (done) => { + it("closed with error or start fails if hub cannot be created", async () => { const hubConnection = getConnectionBuilder(transportType, ENDPOINT_BASE_URL + "/uncreatable", { httpClient }) .withHubProtocol(protocol) .build(); const expectedErrorMessage = "Server returned an error on close: Connection closed with an error. InvalidOperationException: Unable to resolve service for type 'System.Object' while attempting to activate 'FunctionalTests.UncreatableHub'."; + const closePromise = new PromiseSource(); // Either start will fail or onclose will be called. Never both. hubConnection.onclose((error) => { expect(error!.message).toEqual(expectedErrorMessage); - done(); + closePromise.resolve(); }); try { await hubConnection.start(); } catch (error) { expect(error!.message).toEqual(expectedErrorMessage); - done(); + closePromise.resolve(); } + await closePromise; }); - it("can handle different types", async (done) => { + it("can handle different types", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toBe(undefined); - done(); + closePromise.resolve(); }); const complexObject = { @@ -403,16 +418,18 @@ describe("hubConnection", () => { expect(value).toEqual(complexObject); await hubConnection.stop(); + await closePromise; }); - it("can receive different types", async (done) => { + it("can receive different types", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toBe(undefined); - done(); + closePromise.resolve(); }); const complexObject = { @@ -437,9 +454,10 @@ describe("hubConnection", () => { expect(value).toEqual(complexObject); await hubConnection.stop(); + await closePromise; }); - it("can be restarted", async (done) => { + it("can be restarted", async () => { const message = "你好,世界!"; const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) @@ -447,6 +465,7 @@ describe("hubConnection", () => { .build(); let closeCount = 0; + const closePromise = new PromiseSource(); hubConnection.onclose(async (error) => { expect(error).toBe(undefined); @@ -458,7 +477,7 @@ describe("hubConnection", () => { expect(value).toBe(message); await hubConnection.stop(); } else { - done(); + closePromise.resolve(); } }); @@ -467,9 +486,10 @@ describe("hubConnection", () => { expect(result).toBe(message); await hubConnection.stop(); + await closePromise; }); - it("can stream from client to server with rxjs", async (done) => { + it("can stream from client to server with rxjs", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); @@ -483,10 +503,9 @@ describe("hubConnection", () => { subject.complete(); expect(await resultPromise).toBe("Hello world!"); await hubConnection.stop(); - done(); }); - it("can stream from client to server and close with error with rxjs", async (done) => { + it("can stream from client to server and close with error with rxjs", async () => { const hubConnection = getConnectionBuilder(transportType, undefined, { httpClient }) .withHubProtocol(protocol) .build(); @@ -506,7 +525,6 @@ describe("hubConnection", () => { } finally { await hubConnection.stop(); } - done(); }); }); }); @@ -514,7 +532,7 @@ describe("hubConnection", () => { eachTransport((transportType) => { describe("over " + HttpTransportType[transportType] + " transport", () => { - it("can connect to hub with authorization", async (done) => { + it("can connect to hub with authorization", async () => { const message = "你好,世界!"; try { @@ -524,9 +542,10 @@ describe("hubConnection", () => { accessTokenFactory: () => jwtToken, }).build(); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toBe(undefined); - done(); + closePromise.resolve(); }); await hubConnection.start(); const response = await hubConnection.invoke("Echo", message); @@ -535,14 +554,13 @@ describe("hubConnection", () => { await hubConnection.stop(); - done(); + await closePromise; } catch (err) { fail(err); - done(); } }); - it("can connect to hub with authorization using async token factory", async (done) => { + it("can connect to hub with authorization using async token factory", async () => { const message = "你好,世界!"; try { @@ -550,9 +568,10 @@ describe("hubConnection", () => { accessTokenFactory: () => getJwtToken(ENDPOINT_BASE_URL + "/generateJwtToken"), }).build(); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toBe(undefined); - done(); + closePromise.resolve(); }); await hubConnection.start(); const response = await hubConnection.invoke("Echo", message); @@ -561,20 +580,20 @@ describe("hubConnection", () => { await hubConnection.stop(); - done(); + await closePromise; } catch (err) { fail(err); - done(); } }); if (transportType !== HttpTransportType.LongPolling) { - it("terminates if no messages received within timeout interval", async (done) => { + it("terminates if no messages received within timeout interval", async () => { const hubConnection = getConnectionBuilder(transportType).build(); + const closePromise = new PromiseSource(); hubConnection.onclose((error) => { expect(error).toEqual(new Error("Server timeout elapsed without receiving a message from the server.")); - done(); + closePromise.resolve(); }); await hubConnection.start(); @@ -584,30 +603,31 @@ describe("hubConnection", () => { // invoke a method with a response to reset the timeout using the new value await hubConnection.invoke("Echo", ""); + await closePromise; }); } - it("preserves cookies between requests", async (done) => { - const hubConnection = getConnectionBuilder(transportType, HTTPORHTTPS_TESTHUBENDPOINT_URL).build(); - await hubConnection.start(); - const cookieValue = await hubConnection.invoke("GetCookie", "testCookie"); - const cookieValue2 = await hubConnection.invoke("GetCookie", "testCookie2"); - expect(cookieValue).toEqual("testValue"); - expect(cookieValue2).toEqual("testValue2"); - await hubConnection.stop(); - done(); - }); + if (shouldRunHttpsTests) { + it("preserves cookies between requests", async () => { + const hubConnection = getConnectionBuilder(transportType, HTTPORHTTPS_TESTHUBENDPOINT_URL).build(); + await hubConnection.start(); + const cookieValue = await hubConnection.invoke("GetCookie", "testCookie"); + const cookieValue2 = await hubConnection.invoke("GetCookie", "testCookie2"); + expect(cookieValue).toEqual("testValue"); + expect(cookieValue2).toEqual("testValue2"); + await hubConnection.stop(); + }); + } - it("expired cookies are not preserved", async (done) => { + it("expired cookies are not preserved", async () => { const hubConnection = getConnectionBuilder(transportType, HTTPORHTTPS_TESTHUBENDPOINT_URL).build(); await hubConnection.start(); const cookieValue = await hubConnection.invoke("GetCookie", "expiredCookie"); expect(cookieValue).toBeNull(); await hubConnection.stop(); - done(); }); - it("can reconnect", async (done) => { + it("can reconnect", async () => { try { const reconnectingPromise = new PromiseSource(); const reconnectedPromise = new PromiseSource(); @@ -640,16 +660,13 @@ describe("hubConnection", () => { expect(response).toEqual("test"); await hubConnection.stop(); - - done(); } catch (err) { fail(err); - done(); } }); }); - it("can change url in reconnecting state", async (done) => { + it("can change url in reconnecting state", async () => { try { const reconnectingPromise = new PromiseSource(); const hubConnection = getConnectionBuilder(transportType) @@ -671,16 +688,13 @@ describe("hubConnection", () => { expect(hubConnection.baseUrl).toBe("http://example123.com"); await hubConnection.stop(); - - done(); } catch (err) { fail(err); - done(); } }); }); - it("can reconnect after negotiate redirect", async (done) => { + it("can reconnect after negotiate redirect", async () => { try { const reconnectingPromise = new PromiseSource(); const reconnectedPromise = new PromiseSource(); @@ -718,15 +732,12 @@ describe("hubConnection", () => { expect(postReconnectRedirects).toBeGreaterThan(preReconnectRedirects); await hubConnection.stop(); - - done(); } catch (err) { fail(err); - done(); } }); - it("can reconnect after skipping negotiation", async (done) => { + it("can reconnect after skipping negotiation", async () => { try { const reconnectingPromise = new PromiseSource(); const reconnectedPromise = new PromiseSource(); @@ -761,15 +772,12 @@ describe("hubConnection", () => { expect(response).toEqual("test"); await hubConnection.stop(); - - done(); } catch (err) { fail(err); - done(); } }); - it("connection id matches server side connection id", async (done) => { + it("connection id matches server side connection id", async () => { try { const reconnectingPromise = new PromiseSource(); const reconnectedPromise = new PromiseSource(); @@ -808,15 +816,12 @@ describe("hubConnection", () => { await hubConnection.stop(); expect(hubConnection.connectionId).toBeNull(); - - done(); } catch (err) { fail(err); - done(); } }); - it("connection id is alwys null is negotiation is skipped", async (done) => { + it("connection id is alwys null is negotiation is skipped", async () => { try { const hubConnection = getConnectionBuilder( HttpTransportType.WebSockets, @@ -834,16 +839,13 @@ describe("hubConnection", () => { await hubConnection.stop(); expect(hubConnection.connectionId).toBeNull(); - - done(); } catch (err) { fail(err); - done(); } }); if (typeof EventSource !== "undefined") { - it("allows Server-Sent Events when negotiating for JSON protocol", async (done) => { + it("allows Server-Sent Events when negotiating for JSON protocol", async () => { const hubConnection = getConnectionBuilder(undefined, TESTHUB_NOWEBSOCKETS_ENDPOINT_URL) .withHubProtocol(new JsonHubProtocol()) .build(); @@ -855,14 +857,13 @@ describe("hubConnection", () => { expect(await hubConnection.invoke("GetActiveTransportName")).toEqual("ServerSentEvents"); await hubConnection.stop(); - done(); } catch (e) { fail(e); } }); } - it("skips Server-Sent Events when negotiating for MessagePack protocol", async (done) => { + it("skips Server-Sent Events when negotiating for MessagePack protocol", async () => { const hubConnection = getConnectionBuilder(undefined, TESTHUB_NOWEBSOCKETS_ENDPOINT_URL) .withHubProtocol(new MessagePackHubProtocol()) .build(); @@ -874,16 +875,14 @@ describe("hubConnection", () => { expect(await hubConnection.invoke("GetActiveTransportName")).toEqual("LongPolling"); await hubConnection.stop(); - done(); } catch (e) { fail(e); } }); - it("transport falls back from WebSockets to SSE or LongPolling", async (done) => { + it("transport falls back from WebSockets to SSE or LongPolling", async () => { // Skip test on Node as there will always be a WebSockets implementation on Node if (typeof window === "undefined") { - done(); return; } @@ -909,11 +908,10 @@ describe("hubConnection", () => { fail(e); } finally { (window as any).WebSocket = oldWebSocket; - done(); } }); - it("over LongPolling it sends DELETE request and waits for poll to terminate", async (done) => { + it("over LongPolling it sends DELETE request and waits for poll to terminate", async () => { // Create an HTTP client to capture the poll const defaultClient = new DefaultHttpClient(TestLogger.instance); @@ -961,14 +959,12 @@ describe("hubConnection", () => { } catch (e) { fail(e); } finally { - done(); } }); - it("populates the Content-Type header when sending XMLHttpRequest", async (done) => { + it("populates the Content-Type header when sending XMLHttpRequest", async () => { // Skip test on Node as this header isn't set (it was added for React-Native) if (typeof window === "undefined") { - done(); return; } const hubConnection = getConnectionBuilder(HttpTransportType.LongPolling, TESTHUB_NOWEBSOCKETS_ENDPOINT_URL) @@ -984,14 +980,13 @@ describe("hubConnection", () => { expect(await hubConnection.invoke("GetContentTypeHeader")).toEqual("text/plain;charset=UTF-8"); await hubConnection.stop(); - done(); } catch (e) { fail(e); } }); eachTransport((t) => { - it("sets the user agent header", async (done) => { + it("sets the user agent header", async () => { const hubConnection = getConnectionBuilder(t, TESTHUBENDPOINT_URL) .withHubProtocol(new JsonHubProtocol()) .build(); @@ -1010,13 +1005,12 @@ describe("hubConnection", () => { } await hubConnection.stop(); - done(); } catch (e) { fail(e); } }); - it("overwrites library headers with user headers", async (done) => { + it("overwrites library headers with user headers", async () => { const [name] = getUserAgentHeader(); const headers = { [name]: "Custom Agent", "X-HEADER": "VALUE" }; const hubConnection = getConnectionBuilder(t, TESTHUBENDPOINT_URL, { headers }) @@ -1038,7 +1032,6 @@ describe("hubConnection", () => { } await hubConnection.stop(); - done(); } catch (e) { fail(e); } From 1956670a855952a48f075c36c9feb6bb33a27a46 Mon Sep 17 00:00:00 2001 From: Brennan Date: Fri, 21 Jan 2022 09:52:23 -0800 Subject: [PATCH 2/8] fixup --- src/SignalR/clients/ts/FunctionalTests/EchoConnectionHandler.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SignalR/clients/ts/FunctionalTests/EchoConnectionHandler.cs b/src/SignalR/clients/ts/FunctionalTests/EchoConnectionHandler.cs index 52a7630fc911..646d328a5b6f 100644 --- a/src/SignalR/clients/ts/FunctionalTests/EchoConnectionHandler.cs +++ b/src/SignalR/clients/ts/FunctionalTests/EchoConnectionHandler.cs @@ -11,7 +11,6 @@ public class EchoConnectionHandler : ConnectionHandler { public async override Task OnConnectedAsync(ConnectionContext connection) { - while (true) { var result = await connection.Transport.Input.ReadAsync(); From 17e9538d05035338980fe5cbe40ca77704fd2d65 Mon Sep 17 00:00:00 2001 From: Brennan Date: Fri, 21 Jan 2022 11:44:10 -0800 Subject: [PATCH 3/8] fixup --- src/SignalR/clients/ts/FunctionalTests/ts/ConnectionTests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SignalR/clients/ts/FunctionalTests/ts/ConnectionTests.ts b/src/SignalR/clients/ts/FunctionalTests/ts/ConnectionTests.ts index b377c98112c6..8209d66a43b6 100644 --- a/src/SignalR/clients/ts/FunctionalTests/ts/ConnectionTests.ts +++ b/src/SignalR/clients/ts/FunctionalTests/ts/ConnectionTests.ts @@ -176,8 +176,8 @@ describe("connection", () => { withCredentials: false, }); - connection.onreceive = (data: any) => { - fail(new Error(`Unexpected messaged received '${data}'.`)); + connection.onreceive = (_: any) => { + connection.stop(); }; // @ts-ignore: We don't use the error parameter intentionally. From 951d5498642cc97c487f43fc1336179df70d1cdd Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Fri, 21 Jan 2022 14:08:23 -0800 Subject: [PATCH 4/8] Skip tests with expired cert --- src/Security/Authentication/test/CertificateTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Security/Authentication/test/CertificateTests.cs b/src/Security/Authentication/test/CertificateTests.cs index e924fabe5de2..5addf2fabb26 100644 --- a/src/Security/Authentication/test/CertificateTests.cs +++ b/src/Security/Authentication/test/CertificateTests.cs @@ -289,7 +289,7 @@ public async Task VerifyUntrustedClientCertEndsUpInForbidden() Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); } - [Fact] + [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/39669")] public async Task VerifyClientCertWithUntrustedRootAndTrustedChainEndsUpInForbidden() { using var host = await CreateHost( @@ -306,7 +306,7 @@ public async Task VerifyClientCertWithUntrustedRootAndTrustedChainEndsUpInForbid Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); } - [Fact] + [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/39669")] public async Task VerifyValidClientCertWithTrustedChainAuthenticates() { using var host = await CreateHost( From 1d0e4f19c82ce04dce1d33d30c1adef9b3dfc65a Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Fri, 21 Jan 2022 14:23:00 -0800 Subject: [PATCH 5/8] Fxiup --- src/Security/Authentication/test/CertificateTests.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Security/Authentication/test/CertificateTests.cs b/src/Security/Authentication/test/CertificateTests.cs index 5addf2fabb26..47c51c124aa0 100644 --- a/src/Security/Authentication/test/CertificateTests.cs +++ b/src/Security/Authentication/test/CertificateTests.cs @@ -289,7 +289,6 @@ public async Task VerifyUntrustedClientCertEndsUpInForbidden() Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); } - [Fact(Skip = "https://github.com/dotnet/aspnetcore/issues/39669")] public async Task VerifyClientCertWithUntrustedRootAndTrustedChainEndsUpInForbidden() { using var host = await CreateHost( From d6d38f6bd9fceb4a05044641e20723c60d7ca67a Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Fri, 21 Jan 2022 14:26:51 -0800 Subject: [PATCH 6/8] Fixup --- src/Security/Authentication/test/CertificateTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Security/Authentication/test/CertificateTests.cs b/src/Security/Authentication/test/CertificateTests.cs index 47c51c124aa0..789487179255 100644 --- a/src/Security/Authentication/test/CertificateTests.cs +++ b/src/Security/Authentication/test/CertificateTests.cs @@ -289,6 +289,7 @@ public async Task VerifyUntrustedClientCertEndsUpInForbidden() Assert.Equal(HttpStatusCode.Forbidden, response.StatusCode); } + [Fact] public async Task VerifyClientCertWithUntrustedRootAndTrustedChainEndsUpInForbidden() { using var host = await CreateHost( From bab85d5e515502455890fa5299b205dbcd83aff9 Mon Sep 17 00:00:00 2001 From: Will Godbe Date: Mon, 24 Jan 2022 10:40:01 -0800 Subject: [PATCH 7/8] Improve File access issues --- eng/Build.props | 25 +++++++++++-------- ...soft.AspNetCore.Components.E2ETests.csproj | 4 ++- ....AspNetCore.Hosting.FunctionalTests.csproj | 13 +++++++++- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/eng/Build.props b/eng/Build.props index b2ac403f12d0..5fe74a74651d 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -16,19 +16,24 @@ - + + + + diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj index c727765672fa..7edaf43432b3 100644 --- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj +++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj @@ -39,7 +39,9 @@ - + diff --git a/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj b/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj index c964da91d929..19a0212ce393 100644 --- a/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj +++ b/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj @@ -17,7 +17,18 @@ - + + + From 11963184d8b35dad9eeb5e43687c90982050bf58 Mon Sep 17 00:00:00 2001 From: Will Godbe Date: Mon, 24 Jan 2022 13:04:23 -0800 Subject: [PATCH 8/8] Remove BasicTestApp Change --- .../E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj index 7edaf43432b3..c727765672fa 100644 --- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj +++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj @@ -39,9 +39,7 @@ - +