Skip to content

Upgrade CoreWCF Packages and Enable Tests #5813

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ public static void BasicHttps_SecModeTransWithMessCred_CertClientCredential_Succ
[WcfTheory]
[Issue(2870, OS = OSID.OSX)]
[Condition(nameof(Root_Certificate_Installed),
nameof(SSL_Available),
nameof(Skip_CoreWCFService_FailedTest))]
nameof(SSL_Available))]
[OuterLoop]
[InlineData(TransferMode.Buffered)]
[InlineData(TransferMode.Streamed)]
Expand Down Expand Up @@ -110,8 +109,7 @@ public static void BasicHttps_SecModeTransWithMessCred_UserNameClientCredential_
[WcfFact]
[Issue(2870, OS = OSID.OSX)]
[Condition(nameof(Root_Certificate_Installed),
nameof(SSL_Available),
nameof(Skip_CoreWCFService_FailedTest))]
nameof(SSL_Available))]
[OuterLoop]
public static void Https_SecModeTransWithMessCred_UserNameClientCredential_Succeeds()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ public class WS2007HttpTransportWithMessageCredentialsSecurityTests : Conditiona
[Issue(2870, OS = OSID.OSX)]
[Condition(nameof(Root_Certificate_Installed),
nameof(Client_Certificate_Installed),
nameof(SSL_Available),
nameof(Skip_CoreWCFService_FailedTest))]
nameof(SSL_Available))]
[OuterLoop]
public static void Https_SecModeTransWithMessCred_CertClientCredential_Succeeds()
{
Expand Down Expand Up @@ -62,8 +61,7 @@ public static void Https_SecModeTransWithMessCred_CertClientCredential_Succeeds(

[WcfFact]
[Condition(nameof(Root_Certificate_Installed),
nameof(SSL_Available),
nameof(Skip_CoreWCFService_FailedTest))]
nameof(SSL_Available))]
[OuterLoop]
public static void Https_SecModeTransWithMessCred_UserNameClientCredential_Succeeds()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public class WSHttpTransportWithMessageCredentialSecurityTests : ConditionalWcfT
[Issue(2870, OS = OSID.OSX)]
[Condition(nameof(Root_Certificate_Installed),
nameof(Client_Certificate_Installed),
nameof(SSL_Available),
nameof(Skip_CoreWCFService_FailedTest))]
nameof(SSL_Available))]
[OuterLoop]
public static void Https_SecModeTransWithMessCred_CertClientCredential_Succeeds()
{
Expand Down Expand Up @@ -63,8 +62,7 @@ public static void Https_SecModeTransWithMessCred_CertClientCredential_Succeeds(

[WcfFact]
[Condition(nameof(Root_Certificate_Installed),
nameof(SSL_Available),
nameof(Skip_CoreWCFService_FailedTest))]
nameof(SSL_Available))]
[OuterLoop]
public static void Https_SecModeTransWithMessCred_UserNameClientCredential_Succeeds()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public class WSNetTcpTransportWithMessageCredentialSecurityTests : ConditionalWc
[Issue(2870, OS = OSID.OSX)]
[Condition(nameof(Root_Certificate_Installed),
nameof(Client_Certificate_Installed),
nameof(SSL_Available),
nameof(Skip_CoreWCFService_FailedTest))]
nameof(SSL_Available))]
[OuterLoop]
public static void NetTcp_SecModeTransWithMessCred_CertClientCredential_Succeeds()
{
Expand Down Expand Up @@ -66,8 +65,7 @@ public static void NetTcp_SecModeTransWithMessCred_CertClientCredential_Succeeds
[WcfFact]
[Issue(2870, OS = OSID.OSX)]
[Condition(nameof(Root_Certificate_Installed),
nameof(SSL_Available),
nameof(Skip_CoreWCFService_FailedTest))]
nameof(SSL_Available))]
[OuterLoop]
public static void NetTcp_SecModeTransWithMessCred_UserNameClientCredential_Succeeds()
{
Expand Down Expand Up @@ -116,8 +114,7 @@ public static void NetTcp_SecModeTransWithMessCred_UserNameClientCredential_Succ
[WcfFact]
[Issue(2870, OS = OSID.OSX)]
[Condition(nameof(Root_Certificate_Installed),
nameof(SSL_Available),
nameof(Skip_CoreWCFService_FailedTest))]
nameof(SSL_Available))]
[OuterLoop]
public static void NetTcp_SecModeTransWithMessCred_UserNameClientCredential_Succeeds_WithSingleThreadedSyncContext()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public partial class RequestReplyChannelShapeTests : ConditionalWcfTest
[WcfFact]
[Issue(3572, OS = OSID.OSX)]
[Condition(nameof(Root_Certificate_Installed),
nameof(SSL_Available),
nameof(Skip_CoreWCFService_FailedTest))]
nameof(SSL_Available))]
[OuterLoop]
public static void IRequestChannel_Https_NetHttpsBinding()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using System.Threading.Tasks;
using Xunit;

public partial class ExpectedExceptionTests : ConditionalWcfTest
public partial class ExpectedExceptionTests
{
[WcfFact]
[OuterLoop]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using System.Threading.Tasks;
using Xunit;

public partial class ExpectedExceptionTests : ConditionalWcfTest
public partial class ExpectedExceptionTests
{
[WcfFact]
[OuterLoop]
Expand Down Expand Up @@ -185,7 +185,6 @@ public static void UnknownUrl_Throws_EndpointNotFoundException()
}

[WcfFact]
[Condition(nameof(Skip_CoreWCFService_FailedTest))]
[OuterLoop]
public static void UnknownUrl_Throws_ProtocolException()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,6 @@ public static void WebSocket_WSScheme_WSTransportUsageAlways_DuplexCallback_Guid
// When not using a callback you can still force WCF to use WebSockets.
// This test verifies that it actually uses WebSockets when not using a callback.
[WcfFact]
[Condition(nameof(Skip_CoreWCFService_FailedTest))]
[Issue(1438, OS = OSID.Windows_7)] // not supported on Win7
[OuterLoop]
public static void WebSocket_Http_VerifyWebSocketsUsed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using System.ServiceModel.Web;
#endif
using System.Net;
using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using WcfTestCommon;
Expand Down Expand Up @@ -96,7 +97,15 @@ public Stream Crl()
{
// The test.crl is generated by the cert util tool and will not expire until the root cert expires.
// We should investigate if we can generate it in the run time. This is not a blocking issue.
string downloadFilePath = @"c:\\WCFTest\\test.crl";
string downloadFilePath;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
downloadFilePath = @"c:\\WCFTest\\test.crl";
}
else
{
downloadFilePath = Path.Combine(Environment.CurrentDirectory, "test.crl");
}
WebOperationContext.Current.OutgoingResponse.ContentType = "application/x-pkcs7-crl";
WebOperationContext.Current.OutgoingResponse.Headers["Content-Disposition"] = "attachment; filename=\"wcf-crl.crl\"";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ public static async Task Main(string[] args)
Console.WriteLine("Installing certificates...");
string testserverbase = string.Empty;
TimeSpan validatePeriod = TimeSpan.FromDays(1);
string crlFileLocation = "c:\\WCFTest\\test.crl";
int DefaultHttpPort = 8081;
string crlFileLocation;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
crlFileLocation = "c:\\WCFTest\\test.crl";
}
else
{
crlFileLocation = Path.Combine(Environment.CurrentDirectory, "test.crl");
}

CertificateGeneratorLibrary.SetupCerts(testserverbase, validatePeriod, crlFileLocation, DefaultHttpPort);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>true</ImplicitUsings>
Expand All @@ -11,10 +11,10 @@
<Using Include="Microsoft.Extensions.DependencyInjection.Extensions" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CoreWCF.Http" Version="1.6" />
<PackageReference Include="CoreWCF.NetTcp" Version="1.6" />
<PackageReference Include="CoreWCF.Primitives" Version="1.6" />
<PackageReference Include="CoreWCF.WebHttp" Version="1.6" />
<PackageReference Include="CoreWCF.Http" Version="1.8.0" />
<PackageReference Include="CoreWCF.NetTcp" Version="1.8.0" />
<PackageReference Include="CoreWCF.Primitives" Version="1.8.0" />
<PackageReference Include="CoreWCF.WebHttp" Version="1.8.0" />
<PackageReference Include="idunno.Authentication.Basic" Version="2.4.0" />
</ItemGroup>
<ItemGroup>
Expand All @@ -33,8 +33,6 @@
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\ReliableSessionOneWayTestServiceHost.cs" />
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\ReliableSessionTestServiceHost.cs" />
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\Saml2IssuedTokenTestServiceHost.cs" />
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\HttpsTransportSecurityMessageCredentialsCertTestServiceHost.cs" />
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\HttpsTransportSecurityMessageCredentialsUsernameTestServiceHost.cs" />

<None Include="..\IISHostedWcfService\App_code\testhosts\Federation\AcceptAnyUsernameSecurityTokenHandler.cs" />
<None Include="..\IISHostedWcfService\App_code\testhosts\Federation\FederationSTSServiceHost.cs" />
Expand All @@ -44,8 +42,6 @@
<None Include="..\IISHostedWcfService\App_code\testhosts\ReliableSessionOneWayTestServiceHost.cs" />
<None Include="..\IISHostedWcfService\App_code\testhosts\ReliableSessionTestServiceHost.cs" />
<None Include="..\IISHostedWcfService\App_code\testhosts\Saml2IssuedTokenTestServiceHost.cs" />
<None Include="..\IISHostedWcfService\App_code\testhosts\HttpsTransportSecurityMessageCredentialsCertTestServiceHost.cs" />
<None Include="..\IISHostedWcfService\App_code\testhosts\HttpsTransportSecurityMessageCredentialsUsernameTestServiceHost.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\IISHostedWcfService\Web.config">
Expand Down
Loading