Correct test attributes
- #654 - `[IPv6SupportedCondition]` requires `[ConditionalFact]` or `[ConditionalTheory]`
This commit is contained in:
parent
d83ad64ad6
commit
37055517ee
|
|
@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Http.Extensions;
|
using Microsoft.AspNetCore.Http.Extensions;
|
||||||
|
using Microsoft.AspNetCore.Testing.xunit;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
|
|
@ -21,7 +22,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
|
||||||
await RegisterAddresses_Success(addressInput, testUrls);
|
await RegisterAddresses_Success(addressInput, testUrls);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory, MemberData(nameof(AddressRegistrationDataIPv6))]
|
[ConditionalTheory, MemberData(nameof(AddressRegistrationDataIPv6))]
|
||||||
[IPv6SupportedCondition]
|
[IPv6SupportedCondition]
|
||||||
public async Task RegisterAddresses_IPv6_Success(string addressInput, string[] testUrls)
|
public async Task RegisterAddresses_IPv6_Success(string addressInput, string[] testUrls)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Net;
|
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
@ -11,6 +10,7 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Testing.xunit;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
@ -84,7 +84,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
|
||||||
return TestRemoteIPAddress("localhost", requestAddress, expectAddress);
|
return TestRemoteIPAddress("localhost", requestAddress, expectAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[ConditionalFact]
|
||||||
[IPv6SupportedCondition]
|
[IPv6SupportedCondition]
|
||||||
public Task RemoteIPv6Address()
|
public Task RemoteIPv6Address()
|
||||||
{
|
{
|
||||||
|
|
@ -166,10 +166,10 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
response.Append(Encoding.ASCII.GetString(buffer, 0, length));
|
response.Append(Encoding.ASCII.GetString(buffer, 0, length));
|
||||||
}
|
}
|
||||||
|
|
||||||
Assert.StartsWith("HTTP/1.1 200 OK", response.ToString());
|
Assert.StartsWith("HTTP/1.1 200 OK", response.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue