Skip to content

Commit

Permalink
Update launchUrl and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
captainsafia committed Apr 29, 2024
1 parent f35b58c commit 4572898
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
//#if (EnableOpenAPI)
"launchUrl": "swagger",
//#else
"launchUrl": "weatherforecast",
//#endif
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand All @@ -39,11 +35,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
//#if (EnableOpenAPI)
"launchUrl": "swagger",
//#else
"launchUrl": "weatherforecast",
//#endif
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand All @@ -53,11 +45,7 @@
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
//#if (EnableOpenAPI)
"launchUrl": "swagger",
//#else
"launchUrl": "weatherforecast",
//#endif
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public async Task WebApiTemplateCSharp_WithoutOpenAPI(bool useProgramMain, bool
aspNetProcess.Process.HasExited,
ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", project, aspNetProcess.Process));

await aspNetProcess.AssertNotFound("swagger");
await aspNetProcess.AssertNotFound("openapi/v1.json");
}

[ConditionalTheory]
Expand Down Expand Up @@ -206,7 +206,7 @@ public async Task WebApiTemplateCSharpNoHttps_WithoutOpenAPI(bool useProgramMain
aspNetProcess.Process.HasExited,
ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", project, aspNetProcess.Process));

await aspNetProcess.AssertNotFound("swagger");
await aspNetProcess.AssertNotFound("openapi/v1.json");
}

private async Task<Project> PublishAndBuildWebApiTemplate(string languageOverride, string auth, string[] args = null)
Expand Down Expand Up @@ -260,7 +260,7 @@ private async Task WebApiTemplateCore(string languageOverride, string[] args = n
ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", project, aspNetProcess.Process));

await aspNetProcess.AssertOk("weatherforecast");
await aspNetProcess.AssertOk("swagger");
await aspNetProcess.AssertOk("openapi/v1.json");
await aspNetProcess.AssertNotFound("/");
}

Expand All @@ -271,8 +271,6 @@ private async Task WebApiTemplateCore(string languageOverride, string[] args = n
ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", project, aspNetProcess.Process));

await aspNetProcess.AssertOk("weatherforecast");
// Swagger is only available in Development
await aspNetProcess.AssertNotFound("swagger");
await aspNetProcess.AssertNotFound("/");
}
}
Expand Down

0 comments on commit 4572898

Please sign in to comment.