Skip to content

Unskip OpenAPI tests #14296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 2 additions & 23 deletions src/Tools/Microsoft.dotnet-openapi/test/OpenApiAddFileTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void OpenApi_Add_File_EquivilentPaths()
Assert.Single(openApiRefs);
}

[Fact (Skip = "https://github.com/aspnet/AspNetCore/pull/13571/#issuecomment-531466801")]
[Fact]
public async Task OpenApi_Add_NSwagTypeScript()
{
var project = CreateBasicProject(withOpenApi: true);
Expand All @@ -155,20 +155,9 @@ public async Task OpenApi_Add_NSwagTypeScript()
Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content);
Assert.Contains($"<OpenApiReference Include=\"{nswagJsonFile}\" CodeGenerator=\"NSwagTypeScript\" />", content);
}

// Build project and make sure it compiles
using var buildProc = ProcessEx.Run(_outputHelper, _tempDir.Root, "dotnet", "build");
await buildProc.Exited;
Assert.True(buildProc.ExitCode == 0, $"Build failed: {buildProc.Output}");


// Run project and make sure it doesn't crash
using var runProc = ProcessEx.Run(_outputHelper, _tempDir.Root, "dotnet", "run");
Thread.Sleep(100);
Assert.False(runProc.HasExited, $"Run failed with: {runProc.Output}");
}

[Fact (Skip = "https://github.com/aspnet/AspNetCore/pull/13571/#issuecomment-531466801")]
[Fact]
public async Task OpenApi_Add_FromJson()
{
var project = CreateBasicProject(withOpenApi: true);
Expand All @@ -189,16 +178,6 @@ public async Task OpenApi_Add_FromJson()
Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content);
Assert.Contains($"<OpenApiReference Include=\"{nswagJsonFile}\"", content);
}

// Build project and make sure it compiles
var buildProc = ProcessEx.Run(_outputHelper, _tempDir.Root, "dotnet", "build");
await buildProc.Exited;
Assert.True(buildProc.ExitCode == 0, $"Build failed: {buildProc.Output}");

// Run project and make sure it doesn't crash
using var runProc = ProcessEx.Run(_outputHelper, _tempDir.Root, "dotnet", "run");
Thread.Sleep(100);
Assert.False(runProc.HasExited, $"Run failed with: {runProc.Output}");
}

[Fact]
Expand Down