From 0b2a3753bd993f6e07fd628615f9999fa33d36b1 Mon Sep 17 00:00:00 2001 From: Mole Date: Mon, 22 Mar 2021 15:23:15 +0100 Subject: [PATCH] Try hack to get around ssl --- build/azure-pipelines.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 50e79dbe72..6802eb04b5 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -167,8 +167,24 @@ stages: inputs: workingDir: src\Umbraco.Tests.AcceptanceTest verbose: false - - powershell: Invoke-WebRequest https://localhost:44331 -TimeoutSec 120 + - task: PowerShell@1 displayName: Call website + inputs: + scriptType: inlineScript + inlineScript: > + add-type @" + using System.Net; + using System.Security.Cryptography.X509Certificates; + public class TrustAllCertsPolicy : ICertificatePolicy { + public bool CheckValidationResult( + ServicePoint srvPoint, X509Certificate certificate, + WebRequest request, int certificateProblem) { + return true; + } + } + "@ + [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy + Invoke-WebRequest https://localhost:44331 -TimeoutSec 120 - task: Npm@1 displayName: npm run test (AcceptanceTest) inputs: