File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
test/ILLink.Tasks.IntegrationTests Expand file tree Collapse file tree 1 file changed +11
-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+ DisableHttps ( projectRoot ) ;
40+
3941 PreventPublishFiltering ( csproj ) ;
4042
4143 AddLinkerReference ( csproj ) ;
@@ -64,6 +66,15 @@ private void PreventPublishFiltering (string csproj)
6466 xdoc . Save ( fs ) ;
6567 }
6668 }
69+
70+ private void DisableHttps ( string projectRoot )
71+ {
72+ // Web API templates use https auth but this causes issues in CI environments which don't trust the dev cert
73+ string launchSettingsFile = Path . Combine ( projectRoot , "Properties" , "launchSettings.json" ) ;
74+ string launchSettingsContents = File . ReadAllText ( launchSettingsFile ) ;
75+ launchSettingsContents = launchSettingsContents . Replace ( "https://localhost" , "http://localhost" ) ;
76+ File . WriteAllText ( launchSettingsFile , launchSettingsContents ) ;
77+ }
6778 }
6879
6980 public class WebApiTest : IntegrationTestBase , IClassFixture < WebApiFixture >
You can’t perform that action at this time.
0 commit comments