Bring in more changes from 'release/3.1'
- skip failing `OpenApiFileTests` methods - #14021 - use `TestTFM` - do not use `$(ExperimentalVersionPrefix)`
This commit is contained in:
parent
693d39d495
commit
794365b340
|
|
@ -7,7 +7,7 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Microsoft.Extensions.ApiDescription.Tool</RootNamespace>
|
||||
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
|
||||
<VersionPrefix>$(ExperimentalVersionPrefix)</VersionPrefix>
|
||||
<IsShippingPackage>false</IsShippingPackage>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ namespace Microsoft.DotNet.OpenApi.Add.Tests
|
|||
Assert.Single(openApiRefs);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact (Skip = "https://github.com/aspnet/AspNetCore/pull/13571/#issuecomment-531466801")]
|
||||
public async Task OpenApi_Add_NSwagTypeScript()
|
||||
{
|
||||
var project = CreateBasicProject(withOpenApi: true);
|
||||
|
|
@ -168,7 +168,7 @@ namespace Microsoft.DotNet.OpenApi.Add.Tests
|
|||
Assert.False(runProc.HasExited, $"Run failed with: {runProc.Output}");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact (Skip = "https://github.com/aspnet/AspNetCore/pull/13571/#issuecomment-531466801")]
|
||||
public async Task OpenApi_Add_FromJson()
|
||||
{
|
||||
var project = CreateBasicProject(withOpenApi: true);
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ namespace Microsoft.DotNet.OpenApi.Add.Tests
|
|||
{
|
||||
var project1 = refProj1.WithCSharpProject("refProj");
|
||||
project1
|
||||
.WithTargetFrameworks("netcoreapp5.0")
|
||||
.WithTargetFrameworks(TestTFM)
|
||||
.Dir()
|
||||
.Create();
|
||||
|
||||
var project2 = refProj2.WithCSharpProject("refProj2");
|
||||
project2
|
||||
.WithTargetFrameworks("netcoreapp5.0")
|
||||
.WithTargetFrameworks(TestTFM)
|
||||
.Dir()
|
||||
.Create();
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ namespace Microsoft.DotNet.OpenApi.Add.Tests
|
|||
var refProjName = "refProj";
|
||||
var csproj = refProj.WithCSharpProject(refProjName);
|
||||
csproj
|
||||
.WithTargetFrameworks("netcoreapp5.0")
|
||||
.WithTargetFrameworks(TestTFM)
|
||||
.Dir()
|
||||
.Create();
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ namespace Microsoft.DotNet.OpenApi.Add.Tests
|
|||
var refProjName = "refProj";
|
||||
refProj
|
||||
.WithCSharpProject(refProjName)
|
||||
.WithTargetFrameworks("netcoreapp5.0")
|
||||
.WithTargetFrameworks(TestTFM)
|
||||
.Dir()
|
||||
.Create();
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Microsoft.DotNet.OpenApi.Remove.Tests
|
|||
var nswagJsonFile = "openapi.json";
|
||||
_tempDir
|
||||
.WithCSharpProject("testproj")
|
||||
.WithTargetFrameworks("netcoreapp5.0")
|
||||
.WithTargetFrameworks(TestTFM)
|
||||
.Dir()
|
||||
.WithContentFile(nswagJsonFile)
|
||||
.WithContentFile("Startup.cs")
|
||||
|
|
@ -66,7 +66,7 @@ namespace Microsoft.DotNet.OpenApi.Remove.Tests
|
|||
{
|
||||
_tempDir
|
||||
.WithCSharpProject("testproj")
|
||||
.WithTargetFrameworks("netcoreapp5.0")
|
||||
.WithTargetFrameworks(TestTFM)
|
||||
.Dir()
|
||||
.WithContentFile("Startup.cs")
|
||||
.Create();
|
||||
|
|
@ -108,7 +108,7 @@ namespace Microsoft.DotNet.OpenApi.Remove.Tests
|
|||
{
|
||||
_tempDir
|
||||
.WithCSharpProject("testproj")
|
||||
.WithTargetFrameworks("netcoreapp5.0")
|
||||
.WithTargetFrameworks(TestTFM)
|
||||
.Dir()
|
||||
.WithContentFile("Startup.cs")
|
||||
.Create();
|
||||
|
|
@ -117,7 +117,7 @@ namespace Microsoft.DotNet.OpenApi.Remove.Tests
|
|||
var refProjName = "refProj";
|
||||
refProj
|
||||
.WithCSharpProject(refProjName)
|
||||
.WithTargetFrameworks("netcoreapp5.0")
|
||||
.WithTargetFrameworks(TestTFM)
|
||||
.Dir()
|
||||
.Create();
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ namespace Microsoft.DotNet.OpenApi.Remove.Tests
|
|||
var swagFile2 = "swag2.json";
|
||||
_tempDir
|
||||
.WithCSharpProject("testproj")
|
||||
.WithTargetFrameworks("netcoreapp5.0")
|
||||
.WithTargetFrameworks(TestTFM)
|
||||
.Dir()
|
||||
.WithContentFile(nswagJsonFile)
|
||||
.WithFile(swagFile2)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ namespace Microsoft.DotNet.OpenApi.Tests
|
|||
protected readonly TextWriter _output = new StringWriter();
|
||||
protected readonly TextWriter _error = new StringWriter();
|
||||
protected readonly ITestOutputHelper _outputHelper;
|
||||
protected const string TestTFM = "netcoreapp5.0";
|
||||
|
||||
protected const string Content = @"{""x-generator"": ""NSwag""}";
|
||||
protected const string ActualUrl = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/api-with-examples.yaml";
|
||||
|
|
@ -61,7 +62,7 @@ namespace Microsoft.DotNet.OpenApi.Tests
|
|||
var nswagJsonFile = "openapi.json";
|
||||
var project = _tempDir
|
||||
.WithCSharpProject("testproj", sdk: "Microsoft.NET.Sdk.Web")
|
||||
.WithTargetFrameworks("netcoreapp5.0");
|
||||
.WithTargetFrameworks(TestTFM);
|
||||
var tmp = project.Dir();
|
||||
|
||||
if (withOpenApi)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<RootNamespace>Microsoft.Extensions.ApiDescription.Tool</RootNamespace>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<UseAppHost>false</UseAppHost>
|
||||
<VersionPrefix>$(ExperimentalVersionPrefix)</VersionPrefix>
|
||||
<IsShippingPackage>false</IsShippingPackage>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ namespace Microsoft.Extensions.SecretManager.Tools.Internal
|
|||
var existingUserSecretsId = projectDocument.XPathSelectElements("//UserSecretsId").FirstOrDefault();
|
||||
|
||||
// Check if a UserSecretsId is already set
|
||||
if (existingUserSecretsId != null)
|
||||
if (existingUserSecretsId is object)
|
||||
{
|
||||
// Only set the UserSecretsId if the user specified an explicit value
|
||||
if (string.IsNullOrWhiteSpace(OverrideId))
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ namespace Microsoft.DotNet.Watcher.Internal
|
|||
// this code used Process.Exited, which could result in us missing some output due to the ordering of
|
||||
// events.
|
||||
//
|
||||
// See the remarks here: https://docs.microsoft.com/dotnet/api/system.diagnostics.process.waitforexit?view=netcore-2.2#System_Diagnostics_Process_WaitForExit_System_Int32_
|
||||
// See the remarks here: https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.waitforexit#System_Diagnostics_Process_WaitForExit_System_Int32_
|
||||
if (!_process.WaitForExit(Int32.MaxValue))
|
||||
{
|
||||
throw new TimeoutException();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- This needs to be hard-coded, since these test projects choose not to import Directory.Build.Props from the root of the repo -->
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
||||
<AssemblyName>Microsoft.DotNet.Watcher.Tools.Tests</AssemblyName>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);TestProjects\**\*</DefaultItemExcludes>
|
||||
<TestGroupName>DotNetWatcherToolsTests</TestGroupName>
|
||||
|
|
|
|||
Loading…
Reference in New Issue