File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
test/ILLink.Tasks.IntegrationTests Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ public string SetupProject ()
3636 Assert . True ( false ) ;
3737 }
3838
39+ EnsureTrustHttpsDevCert ( projectRoot ) ;
40+
3941 PreventPublishFiltering ( csproj ) ;
4042
4143 AddLinkerReference ( csproj ) ;
@@ -64,6 +66,19 @@ private void PreventPublishFiltering (string csproj)
6466 xdoc . Save ( fs ) ;
6567 }
6668 }
69+
70+ private void EnsureTrustHttpsDevCert ( string projectRoot )
71+ {
72+ // Web API templates use https auth so we need the dev cert to be trusted
73+ int ret = CommandHelper . Dotnet ( "dev-certs https --check" , projectRoot ) ;
74+ if ( ret != 0 ) {
75+ ret = CommandHelper . Dotnet ( "dev-certs https --trust" , projectRoot ) ;
76+ if ( ret != 0 ) {
77+ LogMessage ( "dotnet dev-certs https --trust failed" ) ;
78+ Assert . True ( false ) ;
79+ }
80+ }
81+ }
6782 }
6883
6984 public class WebApiTest : IntegrationTestBase , IClassFixture < WebApiFixture >
You can’t perform that action at this time.
0 commit comments