diff --git a/MusicStore.sln b/MusicStore.sln index 971038d4bd..c4bbf45bde 100644 --- a/MusicStore.sln +++ b/MusicStore.sln @@ -4,6 +4,8 @@ VisualStudioVersion = 15.0.26730.12 MinimumVisualStudioVersion = 15.0.26730.03 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7D749BDA-4638-4517-B66A-D40DEDEEB141}" ProjectSection(SolutionItems) = preProject + .appveyor.yml = .appveyor.yml + .travis.yml = .travis.yml Directory.Build.props = Directory.Build.props Directory.Build.targets = Directory.Build.targets NuGet.config = NuGet.config diff --git a/test/MusicStore.E2ETests/Common/Helpers.cs b/test/MusicStore.E2ETests/Common/Helpers.cs index d526b5d3f1..954cb9dea5 100644 --- a/test/MusicStore.E2ETests/Common/Helpers.cs +++ b/test/MusicStore.E2ETests/Common/Helpers.cs @@ -30,5 +30,18 @@ namespace E2ETests return false; } } + + public static string GetConfigContent(ServerType serverType, string iisConfig) + { + var applicationBasePath = AppContext.BaseDirectory; + + string content = null; + if (serverType == ServerType.IISExpress) + { + content = File.ReadAllText(Path.Combine(applicationBasePath, iisConfig)); + } + + return content; + } } } diff --git a/test/MusicStore.E2ETests/OpenIdConnectTests.cs b/test/MusicStore.E2ETests/OpenIdConnectTests.cs index 79bf923ad8..579fdb1637 100644 --- a/test/MusicStore.E2ETests/OpenIdConnectTests.cs +++ b/test/MusicStore.E2ETests/OpenIdConnectTests.cs @@ -14,7 +14,7 @@ namespace E2ETests public class OpenIdConnectTests : LoggedTest { public static TestMatrix TestVariants - => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx) + => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel) .WithTfms(Tfm.NetCoreApp22, Tfm.NetCoreApp21, Tfm.NetCoreApp20, Tfm.Net461); [ConditionalTheory] @@ -32,6 +32,8 @@ namespace E2ETests ApplicationPath = Helpers.GetApplicationPath(), PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, + ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "Http.config"), + SiteName = "MusicStoreTestSite", EnvironmentName = "OpenIdConnectTesting", UserAdditionalCleanup = parameters => { diff --git a/test/MusicStore.E2ETests/PublishAndRunTests.cs b/test/MusicStore.E2ETests/PublishAndRunTests.cs index b17d76bb51..d55e8e9254 100644 --- a/test/MusicStore.E2ETests/PublishAndRunTests.cs +++ b/test/MusicStore.E2ETests/PublishAndRunTests.cs @@ -16,7 +16,7 @@ namespace E2ETests public class PublishAndRunTests : LoggedTest { public static TestMatrix TestVariants - => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys) + => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.HttpSys) .WithTfms(Tfm.NetCoreApp22, Tfm.NetCoreApp21, Tfm.NetCoreApp20, Tfm.Net461) .WithAllApplicationTypes() .WithAllArchitectures() @@ -38,6 +38,8 @@ namespace E2ETests ApplicationPath = Helpers.GetApplicationPath(), PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging, + ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "Http.config"), + SiteName = "MusicStoreTestSite", UserAdditionalCleanup = parameters => { DbUtils.DropDatabase(musicStoreDbName, logger); diff --git a/test/MusicStore.E2ETests/SmokeTests.cs b/test/MusicStore.E2ETests/SmokeTests.cs index dd9b66bf77..4bebb610c0 100644 --- a/test/MusicStore.E2ETests/SmokeTests.cs +++ b/test/MusicStore.E2ETests/SmokeTests.cs @@ -16,7 +16,7 @@ namespace E2ETests public class SmokeTests : LoggedTest { public static TestMatrix TestVariants - => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys) + => TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.HttpSys) .WithTfms(Tfm.NetCoreApp22, Tfm.NetCoreApp21, Tfm.NetCoreApp20, Tfm.Net461) .WithAllApplicationTypes(); @@ -34,7 +34,7 @@ namespace E2ETests { ApplicationPath = Helpers.GetApplicationPath(), EnvironmentName = "SocialTesting", - ServerConfigTemplateContent = (variant.Server == ServerType.IISExpress) ? File.ReadAllText("Http.config") : null, + ServerConfigTemplateContent = Helpers.GetConfigContent(variant.Server, "Http.config"), SiteName = "MusicStoreTestSite", PublishApplicationBeforeDeployment = true, PreservePublishedApplicationForDebugging = Helpers.PreservePublishedApplicationForDebugging,