Skip to content

Commit a96b93f

Browse files
committed
Upgrade CoreWCF packages, fix CRL path and enable tests
1 parent f4aaf2f commit a96b93f

File tree

11 files changed

+36
-35
lines changed

11 files changed

+36
-35
lines changed

src/System.Private.ServiceModel/tests/Scenarios/Binding/WS/TransportWithMessageCredentialSecurity/BasicHttpTransportWithMessageCredentialSecurityTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public static void BasicHttps_SecModeTransWithMessCred_CertClientCredential_Succ
5858
[WcfTheory]
5959
[Issue(2870, OS = OSID.OSX)]
6060
[Condition(nameof(Root_Certificate_Installed),
61-
nameof(SSL_Available),
62-
nameof(Skip_CoreWCFService_FailedTest))]
61+
nameof(SSL_Available))]
6362
[OuterLoop]
6463
[InlineData(TransferMode.Buffered)]
6564
[InlineData(TransferMode.Streamed)]
@@ -110,8 +109,7 @@ public static void BasicHttps_SecModeTransWithMessCred_UserNameClientCredential_
110109
[WcfFact]
111110
[Issue(2870, OS = OSID.OSX)]
112111
[Condition(nameof(Root_Certificate_Installed),
113-
nameof(SSL_Available),
114-
nameof(Skip_CoreWCFService_FailedTest))]
112+
nameof(SSL_Available))]
115113
[OuterLoop]
116114
public static void Https_SecModeTransWithMessCred_UserNameClientCredential_Succeeds()
117115
{

src/System.Private.ServiceModel/tests/Scenarios/Binding/WS/TransportWithMessageCredentialSecurity/WS2007HttpTransportWithMessageCredentialsSecurityTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ public class WS2007HttpTransportWithMessageCredentialsSecurityTests : Conditiona
1515
[Issue(2870, OS = OSID.OSX)]
1616
[Condition(nameof(Root_Certificate_Installed),
1717
nameof(Client_Certificate_Installed),
18-
nameof(SSL_Available),
19-
nameof(Skip_CoreWCFService_FailedTest))]
18+
nameof(SSL_Available))]
2019
[OuterLoop]
2120
public static void Https_SecModeTransWithMessCred_CertClientCredential_Succeeds()
2221
{
@@ -62,8 +61,7 @@ public static void Https_SecModeTransWithMessCred_CertClientCredential_Succeeds(
6261

6362
[WcfFact]
6463
[Condition(nameof(Root_Certificate_Installed),
65-
nameof(SSL_Available),
66-
nameof(Skip_CoreWCFService_FailedTest))]
64+
nameof(SSL_Available))]
6765
[OuterLoop]
6866
public static void Https_SecModeTransWithMessCred_UserNameClientCredential_Succeeds()
6967
{

src/System.Private.ServiceModel/tests/Scenarios/Binding/WS/TransportWithMessageCredentialSecurity/WSHttpTransportWithMessageCredentialSecurityTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ public class WSHttpTransportWithMessageCredentialSecurityTests : ConditionalWcfT
1616
[Issue(2870, OS = OSID.OSX)]
1717
[Condition(nameof(Root_Certificate_Installed),
1818
nameof(Client_Certificate_Installed),
19-
nameof(SSL_Available),
20-
nameof(Skip_CoreWCFService_FailedTest))]
19+
nameof(SSL_Available))]
2120
[OuterLoop]
2221
public static void Https_SecModeTransWithMessCred_CertClientCredential_Succeeds()
2322
{
@@ -63,8 +62,7 @@ public static void Https_SecModeTransWithMessCred_CertClientCredential_Succeeds(
6362

6463
[WcfFact]
6564
[Condition(nameof(Root_Certificate_Installed),
66-
nameof(SSL_Available),
67-
nameof(Skip_CoreWCFService_FailedTest))]
65+
nameof(SSL_Available))]
6866
[OuterLoop]
6967
public static void Https_SecModeTransWithMessCred_UserNameClientCredential_Succeeds()
7068
{

src/System.Private.ServiceModel/tests/Scenarios/Binding/WS/TransportWithMessageCredentialSecurity/WSNetTcpTransportWithMessageCredentialSecurityTests.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ public class WSNetTcpTransportWithMessageCredentialSecurityTests : ConditionalWc
1818
[Issue(2870, OS = OSID.OSX)]
1919
[Condition(nameof(Root_Certificate_Installed),
2020
nameof(Client_Certificate_Installed),
21-
nameof(SSL_Available),
22-
nameof(Skip_CoreWCFService_FailedTest))]
21+
nameof(SSL_Available))]
2322
[OuterLoop]
2423
public static void NetTcp_SecModeTransWithMessCred_CertClientCredential_Succeeds()
2524
{
@@ -66,8 +65,7 @@ public static void NetTcp_SecModeTransWithMessCred_CertClientCredential_Succeeds
6665
[WcfFact]
6766
[Issue(2870, OS = OSID.OSX)]
6867
[Condition(nameof(Root_Certificate_Installed),
69-
nameof(SSL_Available),
70-
nameof(Skip_CoreWCFService_FailedTest))]
68+
nameof(SSL_Available))]
7169
[OuterLoop]
7270
public static void NetTcp_SecModeTransWithMessCred_UserNameClientCredential_Succeeds()
7371
{
@@ -116,8 +114,7 @@ public static void NetTcp_SecModeTransWithMessCred_UserNameClientCredential_Succ
116114
[WcfFact]
117115
[Issue(2870, OS = OSID.OSX)]
118116
[Condition(nameof(Root_Certificate_Installed),
119-
nameof(SSL_Available),
120-
nameof(Skip_CoreWCFService_FailedTest))]
117+
nameof(SSL_Available))]
121118
[OuterLoop]
122119
public static void NetTcp_SecModeTransWithMessCred_UserNameClientCredential_Succeeds_WithSingleThreadedSyncContext()
123120
{

src/System.Private.ServiceModel/tests/Scenarios/Client/ChannelLayer/RequestReplyChannelShapeTests.4.1.0.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ public partial class RequestReplyChannelShapeTests : ConditionalWcfTest
1818
[WcfFact]
1919
[Issue(3572, OS = OSID.OSX)]
2020
[Condition(nameof(Root_Certificate_Installed),
21-
nameof(SSL_Available),
22-
nameof(Skip_CoreWCFService_FailedTest))]
21+
nameof(SSL_Available))]
2322
[OuterLoop]
2423
public static void IRequestChannel_Https_NetHttpsBinding()
2524
{

src/System.Private.ServiceModel/tests/Scenarios/Client/ExpectedExceptions/ExpectedExceptionTests.4.0.0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using System.Threading.Tasks;
1313
using Xunit;
1414

15-
public partial class ExpectedExceptionTests : ConditionalWcfTest
15+
public partial class ExpectedExceptionTests
1616
{
1717
[WcfFact]
1818
[OuterLoop]

src/System.Private.ServiceModel/tests/Scenarios/Client/ExpectedExceptions/ExpectedExceptionTests.4.1.0.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
using System.Threading.Tasks;
1212
using Xunit;
1313

14-
public partial class ExpectedExceptionTests : ConditionalWcfTest
14+
public partial class ExpectedExceptionTests
1515
{
1616
[WcfFact]
1717
[OuterLoop]
@@ -185,7 +185,6 @@ public static void UnknownUrl_Throws_EndpointNotFoundException()
185185
}
186186

187187
[WcfFact]
188-
[Condition(nameof(Skip_CoreWCFService_FailedTest))]
189188
[OuterLoop]
190189
public static void UnknownUrl_Throws_ProtocolException()
191190
{

src/System.Private.ServiceModel/tests/Scenarios/Extensibility/WebSockets/WebSocketTests.4.1.0.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,6 @@ public static void WebSocket_WSScheme_WSTransportUsageAlways_DuplexCallback_Guid
837837
// When not using a callback you can still force WCF to use WebSockets.
838838
// This test verifies that it actually uses WebSockets when not using a callback.
839839
[WcfFact]
840-
[Condition(nameof(Skip_CoreWCFService_FailedTest))]
841840
[Issue(1438, OS = OSID.Windows_7)] // not supported on Win7
842841
[OuterLoop]
843842
public static void WebSocket_Http_VerifyWebSocketsUsed()

src/System.Private.ServiceModel/tools/IISHostedWcfService/App_code/TestHost.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using System.ServiceModel.Web;
1313
#endif
1414
using System.Net;
15+
using System.Runtime.InteropServices;
1516
using System.Security.Cryptography.X509Certificates;
1617
using System.Text;
1718
using WcfTestCommon;
@@ -96,7 +97,15 @@ public Stream Crl()
9697
{
9798
// The test.crl is generated by the cert util tool and will not expire until the root cert expires.
9899
// We should investigate if we can generate it in the run time. This is not a blocking issue.
99-
string downloadFilePath = @"c:\\WCFTest\\test.crl";
100+
string downloadFilePath;
101+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
102+
{
103+
downloadFilePath = @"c:\\WCFTest\\test.crl";
104+
}
105+
else
106+
{
107+
downloadFilePath = Path.Combine(Environment.CurrentDirectory, "test.crl");
108+
}
100109
WebOperationContext.Current.OutgoingResponse.ContentType = "application/x-pkcs7-crl";
101110
WebOperationContext.Current.OutgoingResponse.Headers["Content-Disposition"] = "attachment; filename=\"wcf-crl.crl\"";
102111

src/System.Private.ServiceModel/tools/SelfHostedCoreWcfService/Program.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ public static async Task Main(string[] args)
2929
Console.WriteLine("Installing certificates...");
3030
string testserverbase = string.Empty;
3131
TimeSpan validatePeriod = TimeSpan.FromDays(1);
32-
string crlFileLocation = "c:\\WCFTest\\test.crl";
3332
int DefaultHttpPort = 8081;
33+
string crlFileLocation;
34+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
35+
{
36+
crlFileLocation = "c:\\WCFTest\\test.crl";
37+
}
38+
else
39+
{
40+
crlFileLocation = Path.Combine(Environment.CurrentDirectory, "test.crl");
41+
}
3442

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

0 commit comments

Comments
 (0)