From 191cac80ef5f6b495f89b9004ab6f76365ac5594 Mon Sep 17 00:00:00 2001 From: Hovsep Mkrtchyan Date: Thu, 19 May 2016 16:16:22 -0700 Subject: [PATCH] Bringing back Generator tests to Linux run --- .../CSharp/Azure.CSharp.Tests/AcceptanceTests.cs | 2 +- .../Generators/CSharp/CSharp.Tests/AcceptanceTests.cs | 4 ++-- .../CSharp/CSharp.Tests/Utilities/ServiceController.cs | 2 +- gulpfile.js | 8 ++------ 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/AcceptanceTests.cs b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/AcceptanceTests.cs index 6c254399697c3..4fbbf9753dd07 100644 --- a/AutoRest/Generators/CSharp/Azure.CSharp.Tests/AcceptanceTests.cs +++ b/AutoRest/Generators/CSharp/Azure.CSharp.Tests/AcceptanceTests.cs @@ -70,7 +70,7 @@ public void AzureCustomBaseUriTests() using (var client = new AutoRestParameterizedHostTestClient(new TokenCredentials(Guid.NewGuid().ToString()))) { // small modification to the "host" portion to include the port and the '.' - client.Host = string.Format(CultureInfo.InvariantCulture, "{0}.:{1}", client.Host, Fixture.Port); + client.Host = string.Format(CultureInfo.InvariantCulture, "{0}:{1}", client.Host, Fixture.Port); Assert.Equal(HttpStatusCode.OK, client.Paths.GetEmptyWithHttpMessagesAsync("local").Result.Response.StatusCode); } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/AcceptanceTests.cs b/AutoRest/Generators/CSharp/CSharp.Tests/AcceptanceTests.cs index bdd10a6f30136..f4d91ea4bf753 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/AcceptanceTests.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/AcceptanceTests.cs @@ -1954,7 +1954,7 @@ public void CustomBaseUriTests() using (var client = new AutoRestParameterizedHostTestClient()) { // small modification to the "host" portion to include the port and the '.' - client.Host = string.Format(CultureInfo.InvariantCulture, "{0}.:{1}", client.Host, Fixture.Port); + client.Host = string.Format(CultureInfo.InvariantCulture, "{0}:{1}", client.Host, Fixture.Port); Assert.Equal(HttpStatusCode.OK, client.Paths.GetEmptyWithHttpMessagesAsync("local").Result.Response.StatusCode); } @@ -1969,7 +1969,7 @@ public void CustomBaseUriMoreOptionsTests() { client.SubscriptionId = "test12"; // small modification to the "host" portion to include the port and the '.' - client.DnsSuffix = string.Format(CultureInfo.InvariantCulture, "{0}.:{1}", "host", Fixture.Port); + client.DnsSuffix = string.Format(CultureInfo.InvariantCulture, "{0}:{1}", "host", Fixture.Port); Assert.Equal(HttpStatusCode.OK, client.Paths.GetEmptyWithHttpMessagesAsync("http://lo", "cal", "key1").Result.Response.StatusCode); } diff --git a/AutoRest/Generators/CSharp/CSharp.Tests/Utilities/ServiceController.cs b/AutoRest/Generators/CSharp/CSharp.Tests/Utilities/ServiceController.cs index 420c1b30bd18d..88536dc0baf05 100644 --- a/AutoRest/Generators/CSharp/CSharp.Tests/Utilities/ServiceController.cs +++ b/AutoRest/Generators/CSharp/CSharp.Tests/Utilities/ServiceController.cs @@ -64,7 +64,7 @@ private static string AcceptanceTestsPath public Uri Uri { - get { return new Uri(string.Format(CultureInfo.InvariantCulture, "http://localhost.:{0}", Port)); } + get { return new Uri(string.Format(CultureInfo.InvariantCulture, "http://localhost:{0}", Port)); } } /// diff --git a/gulpfile.js b/gulpfile.js index 611be760a2621..2c436eea03aed 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -555,16 +555,12 @@ var xunitTestsDlls = [ ]; var xunitNetCoreXproj = [ + 'AutoRest/Generators/CSharp/CSharp.Tests/project.json', + 'AutoRest/Generators/CSharp/Azure.CSharp.Tests/project.json', 'ClientRuntimes/CSharp/Microsoft.Rest.ClientRuntime.Tests/project.json', 'ClientRuntimes/CSharp/Microsoft.Rest.ClientRuntime.Azure.Tests/project.json' ]; -// Fix the test execution bug on travis -if(isWindows) { - xunitNetCoreXproj.push('AutoRest/Generators/CSharp/Azure.CSharp.Tests/project.json'); - xunitNetCoreXproj.push('AutoRest/Generators/CSharp/CSharp.Tests/project.json'); -} - var defaultShellOptions = { verbosity: 3, env: {