diff --git a/src/Detector/DotNetCore/DotnetCoreConstants.cs b/src/Detector/DotNetCore/DotnetCoreConstants.cs index 8c3a4005c..c0227eb39 100644 --- a/src/Detector/DotNetCore/DotnetCoreConstants.cs +++ b/src/Detector/DotNetCore/DotnetCoreConstants.cs @@ -29,5 +29,7 @@ namespace Microsoft.Oryx.Detector.DotNetCore public const string AzureFunctionsPackageReference = "Microsoft.NET.Sdk.Functions"; public const string AzureBlazorWasmPackageReference = "Microsoft.AspNetCore.Components.WebAssembly"; + + public const string DefaultOutputType = "Library"; } } diff --git a/src/Detector/DotNetCore/DotnetCoreDetector.cs b/src/Detector/DotNetCore/DotnetCoreDetector.cs index a1fa1a836..1274c661b 100644 --- a/src/Detector/DotNetCore/DotnetCoreDetector.cs +++ b/src/Detector/DotNetCore/DotnetCoreDetector.cs @@ -112,7 +112,7 @@ namespace Microsoft.Oryx.Detector.DotNetCore string outputType = outputTypeElement?.Value; // default OutputType is "Library" - string outputTypeResult = string.IsNullOrEmpty(outputType) ? "Library" : outputType; + string outputTypeResult = string.IsNullOrEmpty(outputType) ? DotNetCoreConstants.DefaultOutputType : outputType; return outputTypeResult; } diff --git a/tests/Detector.Tests/DotNetCore/DotnetCoreDetectorTest.cs b/tests/Detector.Tests/DotNetCore/DotnetCoreDetectorTest.cs index 859b24a33..f1b2341cc 100644 --- a/tests/Detector.Tests/DotNetCore/DotnetCoreDetectorTest.cs +++ b/tests/Detector.Tests/DotNetCore/DotnetCoreDetectorTest.cs @@ -112,8 +112,8 @@ namespace Microsoft.Oryx.Detector.Tests.DotNetCore [Theory] [InlineData("Library", "Library")] [InlineData("Exe", "Exe")] - [InlineData("randomText", "randomtext")] - [InlineData("", "Library")] + [InlineData("randomText", "randomText")] + [InlineData("", DotNetCoreConstants.DefaultOutputType)] public void Detect_ReturnsOutputType( string outputTypeName, string expectedOutputType) @@ -149,13 +149,12 @@ namespace Microsoft.Oryx.Detector.Tests.DotNetCore } [Theory] - [InlineData("Library", null)] - [InlineData("Exe", null)] - [InlineData("randomText", null)] - [InlineData("", null)] + [InlineData("Library")] + [InlineData("Exe")] + [InlineData("randomText")] + [InlineData("")] public void Detect_ReturnsWithoutOutputType( - string outputTypeName, - string expectedOutputType) + string outputTypeName) { // Arrange // create .csproj @@ -183,8 +182,8 @@ namespace Microsoft.Oryx.Detector.Tests.DotNetCore Assert.NotNull(result); - // check our outputType is there - Assert.Equal(expectedOutputType, result.OutputType); + // check our outputType is the default output type + Assert.Equal(DotNetCoreConstants.DefaultOutputType, result.OutputType); } private DetectorContext CreateContext(ISourceRepo sourceRepo) diff --git a/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs b/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs index 05f78cb1c..41c722a43 100644 --- a/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs +++ b/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs @@ -31,8 +31,8 @@ namespace Microsoft.Oryx.BuildImage.Tests public void PipelineTestInvocationLatest() { GeneratesScript_AndBuilds(Settings.BuildImageName); - JamSpell_CanBe_Installed_In_The_BuildImage("latest", "2"); - JamSpell_CanBe_Installed_In_The_BuildImage("latest", "3"); + JamSpell_CanBe_Installed_In_The_BuildImage("latest"); + JamSpell_CanBe_Installed_In_The_BuildImage("latest"); DoesNotGenerateCondaBuildScript_IfImageDoesNotHaveCondaInstalledInIt("latest"); } @@ -40,14 +40,14 @@ namespace Microsoft.Oryx.BuildImage.Tests public void PipelineTestInvocationLtsVersions() { GeneratesScript_AndBuilds(Settings.LtsVersionsBuildImageName); - JamSpell_CanBe_Installed_In_The_BuildImage("lts-versions", "3"); + JamSpell_CanBe_Installed_In_The_BuildImage("lts-versions"); DoesNotGenerateCondaBuildScript_IfImageDoesNotHaveCondaInstalledInIt("lts-versions"); } [Fact, Trait("category", "vso-focal")] public void PipelineTestInvocationVsoFocal() { - JamSpell_CanBe_Installed_In_The_BuildImage("vso-focal", "3"); + JamSpell_CanBe_Installed_In_The_BuildImage("vso-focal"); } [Fact, Trait("category", "githubactions")] @@ -1447,11 +1447,10 @@ namespace Microsoft.Oryx.BuildImage.Tests } [Theory] - [InlineData("lts-versions", "3")] - [InlineData("vso-focal", "3")] - [InlineData("latest", "2")] - [InlineData("latest", "3")] - public void JamSpell_CanBe_Installed_In_The_BuildImage(string tagName, string pythonVersion) + [InlineData("lts-versions")] + [InlineData("vso-focal")] + [InlineData("latest")] + public void JamSpell_CanBe_Installed_In_The_BuildImage(string tagName) { // Arrange var expectedPackage = "jamspell"; diff --git a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreDynamicInstallTest.cs b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreDynamicInstallTest.cs index 237e677e3..9dce0bf9d 100644 --- a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreDynamicInstallTest.cs +++ b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreDynamicInstallTest.cs @@ -23,7 +23,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("3.1", NetCoreApp31MvcApp, "Welcome to ASP.NET Core MVC!")] - public async Task CanBuildAndRun_NetCore31WebApp( + public async Task CanBuildAndRun_NetCore31WebAppAsync( string runtimeVersion, string appName, string expectedResponseContent) @@ -76,7 +76,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("3.1", NetCoreApp31MvcApp, "Welcome to ASP.NET Core MVC!")] [InlineData("5.0", Net5MvcApp, "Welcome to ASP.NET Core MVC!")] - public async Task CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImage( + public async Task CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync( string runtimeVersion, string appName, string expectedResponseContent) diff --git a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCorePreRunCommandOrScriptTest.cs b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCorePreRunCommandOrScriptTest.cs index 137c53e20..b638b1cab 100644 --- a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCorePreRunCommandOrScriptTest.cs +++ b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCorePreRunCommandOrScriptTest.cs @@ -26,7 +26,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NetCore31MvcApp_UsingPreRunCommand_WithDynamicInstall() + public async Task CanBuildAndRun_NetCore31MvcApp_UsingPreRunCommand_WithDynamicInstallAsync() { // Arrange var runtimeVersion = "3.1"; @@ -93,7 +93,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NetCore31MvcApp_UsingPreRunScript_WithDynamicInstall() + public async Task CanBuildAndRun_NetCore31MvcApp_UsingPreRunScript_WithDynamicInstallAsync() { // Arrange var runtimeVersion = "3.1"; diff --git a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion30Tests.cs b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion30Tests.cs index 45833cefc..09cdc80be 100644 --- a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion30Tests.cs +++ b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion30Tests.cs @@ -23,10 +23,10 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_FSharpNetCoreApp21WebApp_WithoutSpecifyingPlatformExplicitly() + public async Task CanBuildAndRun_FSharpNetCoreApp30WebApp_WithoutSpecifyingPlatformExplicitlyAsync() { // Arrange - var hostDir = Path.Combine(_hostSamplesDir, "DotNetCore", "FSharpNetCoreApp21.WebApp"); + var hostDir = Path.Combine(_hostSamplesDir, "DotNetCore", "FSharpNetCoreApp30.WebApp"); var volume = DockerVolume.CreateMirror(hostDir); var appDir = volume.ContainerDir; var appOutputDirVolume = CreateAppOutputDirVolume(); @@ -50,7 +50,7 @@ namespace Microsoft.Oryx.Integration.Tests "-c", buildImageScript }, - _imageHelper.GetRuntimeImage("dotnetcore", "2.1"), + _imageHelper.GetRuntimeImage("dotnetcore", "3.0"), ContainerPort, "/bin/sh", new[] @@ -67,7 +67,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NetCore30WebApp() + public async Task CanBuildAndRun_NetCore30WebAppAsync() { // Arrange var dotnetcoreVersion = "3.0"; @@ -112,7 +112,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NetCore30MvcApp() + public async Task CanBuildAndRun_NetCore30MvcAppAsync() { // Arrange var dotnetcoreVersion = "3.0"; @@ -157,7 +157,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanRun_NetCore30App_PublishedOnMacMachine_ButRunOnNetCore30RuntimeContainer() + public async Task CanRun_NetCore30App_PublishedOnMacMachine_ButRunOnNetCore30RuntimeContainerAsync() { // This test verifies that we fallback to using 'dotnet TodoAppFromMac.dll' since the executable // file 'TodoAppFromMac' was indeed generated from a Mac OS and cannot be run in a Linux container. @@ -193,7 +193,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NetCore30WebApp_UsingExplicitStartupCommand() + public async Task CanBuildAndRun_NetCore30WebApp_UsingExplicitStartupCommandAsync() { // Arrange var dotnetcoreVersion = "3.0"; @@ -241,7 +241,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NetCore30WebApp_HavingExplicitAssemblyName() + public async Task CanBuildAndRun_NetCore30WebApp_HavingExplicitAssemblyNameAsync() { // Arrange var appName = "NetCoreApp30WebAppWithExplicitAssemblyName"; diff --git a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion31Tests.cs b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion31Tests.cs index 35ec69b4c..cfd9ab708 100644 --- a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion31Tests.cs +++ b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion31Tests.cs @@ -23,7 +23,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NetCore31WebApp() + public async Task CanBuildAndRun_NetCore31WebAppAsync() { // Arrange var dotnetcoreVersion = "3.1"; @@ -68,7 +68,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRunApp_FromNestedOutputDirectory() + public async Task CanBuildAndRunApp_FromNestedOutputDirectoryAsync() { // Arrange var dotnetcoreVersion = "3.1"; @@ -115,7 +115,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanRunAppWhichUsesGDILibrary() + public async Task CanRunAppWhichUsesGDILibraryAsync() { // Arrange var appName = "ImageResizingWebApp"; @@ -162,7 +162,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFile() + public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFileAsync() { // Arrange var dotnetcoreVersion = "3.1"; diff --git a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion50Tests.cs b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion50Tests.cs index 96bd2c640..f8a5ea7ab 100644 --- a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion50Tests.cs +++ b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion50Tests.cs @@ -23,7 +23,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_Without_Oryx_AppInsights_Codeless_Configuration() + public async Task CanBuildAndRun_Without_Oryx_AppInsights_Codeless_ConfigurationAsync() { // Arrange var dotnetcoreVersion = DotNetCoreRunTimeVersions.NetCoreApp50; @@ -80,7 +80,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NetCore50MvcApp() + public async Task CanBuildAndRun_NetCore50MvcAppAsync() { // Arrange var dotnetcoreVersion = DotNetCoreRunTimeVersions.NetCoreApp50; diff --git a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion60Tests.cs b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion60Tests.cs index bc3ee8a8f..c7cf86e75 100644 --- a/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion60Tests.cs +++ b/tests/Oryx.Integration.Tests/DotNetCore/DotNetCoreRuntimeVersion60Tests.cs @@ -24,7 +24,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NetCore60MvcApp() + public async Task CanBuildAndRun_NetCore60MvcAppAsync() { // Arrange var dotnetcoreVersion = DotNetCoreRunTimeVersions.NetCoreApp60; @@ -72,7 +72,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_Adds_Oryx_AppInsights_Codeless_Configuration() + public async Task CanBuildAndRun_Adds_Oryx_AppInsights_Codeless_ConfigurationAsync() { // Arrange var dotnetcoreVersion = DotNetCoreRunTimeVersions.NetCoreApp60; @@ -130,7 +130,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_DoesNot_Add_Oryx_AppInsights_Codeless_Configuration() + public async Task CanBuildAndRun_DoesNot_Add_Oryx_AppInsights_Codeless_ConfigurationAsync() { // Arrange var dotnetcoreVersion = DotNetCoreRunTimeVersions.NetCoreApp60; @@ -188,7 +188,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NetCore60MvcApp_UsingExplicitStartupCommand() + public async Task CanBuildAndRun_NetCore60MvcApp_UsingExplicitStartupCommandAsync() { // Arrange var dotnetcoreVersion = DotNetCoreRunTimeVersions.NetCoreApp60; @@ -236,7 +236,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRunApp_FromNestedOutputDirectory() + public async Task CanBuildAndRunApp_FromNestedOutputDirectoryAsync() { // Arrange var dotnetcoreVersion = DotNetCoreRunTimeVersions.NetCoreApp60; @@ -284,7 +284,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFile() + public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFileAsync() { // Arrange var dotnetcoreVersion = DotNetCoreRunTimeVersions.NetCoreApp60; diff --git a/tests/Oryx.Integration.Tests/Golang/GolangBuildRunTests.cs b/tests/Oryx.Integration.Tests/Golang/GolangBuildRunTests.cs index 2f753b251..ee064325e 100644 --- a/tests/Oryx.Integration.Tests/Golang/GolangBuildRunTests.cs +++ b/tests/Oryx.Integration.Tests/Golang/GolangBuildRunTests.cs @@ -23,7 +23,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanRunApp_WithoutBuildManifestFile() + public async Task CanRunApp_WithoutBuildManifestFileAsync() { // Arrange var golangVersion = "1.17"; diff --git a/tests/Oryx.Integration.Tests/Node/NodeAngularAppTest.cs b/tests/Oryx.Integration.Tests/Node/NodeAngularAppTest.cs index 4cd5c40a5..785142a74 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeAngularAppTest.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeAngularAppTest.cs @@ -24,7 +24,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("14"), Trait("category", "node-14")] - public async Task CanBuildAndRunAngular6_WithDevAndProdDependencies_UsingCompressedNodeModules(string nodeVersion) + public async Task CanBuildAndRunAngular6_WithDevAndProdDependencies_UsingCompressedNodeModulesAsync(string nodeVersion) { // Arrange string compressFormat = "tar-gz"; @@ -72,7 +72,7 @@ namespace Microsoft.Oryx.Integration.Tests // Official Node.js version that is supported by Angular CLI 8.0+ is 10.9 or greater [Theory] [InlineData("14"), Trait("category", "node-14")] - public async Task CanBuildAndRun_Angular8App_WithoutCompressedNodeModules(string nodeVersion) + public async Task CanBuildAndRun_Angular8App_WithoutCompressedNodeModulesAsync(string nodeVersion) { // Arrange var appName = "angular8app"; @@ -117,7 +117,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("14"), Trait("category", "node-14")] - public async Task CanBuildAndRun_Angular8App_NodeModules_SymLink_Exists_InRoot_WithoutCompression(string nodeVersion) + public async Task CanBuildAndRun_Angular8App_NodeModules_SymLink_Exists_InRoot_WithoutCompressionAsync(string nodeVersion) { // Arrange var appName = "angular8app"; @@ -188,7 +188,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("14"), Trait("category", "node-14")] - public async Task CanBuildAndRunAngular8_WithDevAndProdDependencies_NodeModules_Dir_Exists_InAppDir_UsingCompression(string nodeVersion) + public async Task CanBuildAndRunAngular8_WithDevAndProdDependencies_NodeModules_Dir_Exists_InAppDir_UsingCompressionAsync(string nodeVersion) { // Arrange string compressFormat = "tar-gz"; @@ -267,7 +267,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("14"), Trait("category", "node-14-2")] - public async Task CanBuildAndRunAngular8_WithDevAndProdDependencies_NodeModules_SymLink_Exists_InAppDir_UsingCompression(string nodeVersion) + public async Task CanBuildAndRunAngular8_WithDevAndProdDependencies_NodeModules_SymLink_Exists_InAppDir_UsingCompressionAsync(string nodeVersion) { // Arrange string compressFormat = "tar-gz"; @@ -349,7 +349,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("14"), Trait("category", "node-14-2")] - public async Task CanBuildAndRunAngular8_WithDevAndProdDependencies_UsingCompressedNodeModules(string nodeVersion) + public async Task CanBuildAndRunAngular8_WithDevAndProdDependencies_UsingCompressedNodeModulesAsync(string nodeVersion) { // Arrange string compressFormat = "tar-gz"; diff --git a/tests/Oryx.Integration.Tests/Node/NodeDynamicInstallationTest.cs b/tests/Oryx.Integration.Tests/Node/NodeDynamicInstallationTest.cs index 7983b737a..d59935ea6 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeDynamicInstallationTest.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeDynamicInstallationTest.cs @@ -25,7 +25,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData(NodeVersions.Node14Version), Trait("category", "node-14")] [InlineData(NodeVersions.Node16Version), Trait("category", "node-16")] - public async Task CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImage(string nodeVersion) + public async Task CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(string nodeVersion) { // Arrange var appName = "webfrontend"; @@ -75,7 +75,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData(NodeVersions.Node14Version), Trait("category", "node-14")] [InlineData(NodeVersions.Node16Version), Trait("category", "node-16")] - public async Task CanBuildAndRunApp_UsingScriptCommand(string nodeVersion) + public async Task CanBuildAndRunApp_UsingScriptCommandAsync(string nodeVersion) { // Arrange var appName = "webfrontend"; diff --git a/tests/Oryx.Integration.Tests/Node/NodeMySqlIntegrationTests.cs b/tests/Oryx.Integration.Tests/Node/NodeMySqlIntegrationTests.cs index ddda59669..c999ff1eb 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeMySqlIntegrationTests.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeMySqlIntegrationTests.cs @@ -22,7 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory(Skip = "bug: 1505700 may be intermittent")] [InlineData("latest")] [InlineData("github-actions")] - public async Task NodeApp_MySqlDB(string imageTag) + public async Task NodeApp_MySqlDBAsync(string imageTag) { await RunTestAsync( "nodejs", diff --git a/tests/Oryx.Integration.Tests/Node/NodeNextJsAppTest.cs b/tests/Oryx.Integration.Tests/Node/NodeNextJsAppTest.cs index 7d5898360..43d7d3a79 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeNextJsAppTest.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeNextJsAppTest.cs @@ -24,7 +24,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact(Skip = "next blogger app is broken")] - public async Task CanBuildAndRun_BlogStarterNextJsApp_WithoutZippingNodeModules() + public async Task CanBuildAndRun_BlogStarterNextJsApp_WithoutZippingNodeModulesAsync() { // Arrange var nodeVersion = "14"; @@ -68,7 +68,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact(Skip = "next blogger app is broken")] - public async Task CanBuildAndRun_BlogStarterNextJsApp_UsingZippedNodeModules() + public async Task CanBuildAndRun_BlogStarterNextJsApp_UsingZippedNodeModulesAsync() { // Arrange var nodeVersion = "14"; diff --git a/tests/Oryx.Integration.Tests/Node/NodeNuxtJsAppTest.cs b/tests/Oryx.Integration.Tests/Node/NodeNuxtJsAppTest.cs index 3784af5a5..e3083204b 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeNuxtJsAppTest.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeNuxtJsAppTest.cs @@ -25,7 +25,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_HackerNewsNuxtJsApp_WithoutZippingNodeModules() + public async Task CanBuildAndRun_HackerNewsNuxtJsApp_WithoutZippingNodeModulesAsync() { // Arrange var nodeVersion = "14"; @@ -71,7 +71,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_HackerNewsNuxtJsApp_UsingZippedNodeModules() + public async Task CanBuildAndRun_HackerNewsNuxtJsApp_UsingZippedNodeModulesAsync() { // Arrange var nodeVersion = "14"; diff --git a/tests/Oryx.Integration.Tests/Node/NodeOtherEndtoEndTests.cs b/tests/Oryx.Integration.Tests/Node/NodeOtherEndtoEndTests.cs index c73e2274e..cbd4e2d24 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeOtherEndtoEndTests.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeOtherEndtoEndTests.cs @@ -28,7 +28,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-5")] - public async Task CanBuildAndRunNodeApp_UsingCustomManifestFileLocation() + public async Task CanBuildAndRunNodeApp_UsingCustomManifestFileLocationAsync() { // Arrange var manifestDirPath = Directory.CreateDirectory( @@ -80,7 +80,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-5")] - public async Task CanBuildAndRunNodeApp_UsingZippedNodeModules_WithoutExtracting() + public async Task CanBuildAndRunNodeApp_UsingZippedNodeModules_WithoutExtractingAsync() { // Arrange var appOutputDirPath = Directory.CreateDirectory(Path.Combine(_tempRootDir, Guid.NewGuid().ToString("N"))) @@ -133,7 +133,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory(Skip = "Bug#1071724")] [InlineData("true")] [InlineData("false")] - public async Task CopiesNodeModulesInSubDirectory_ToDestinationAre_WithoutCompressedNodeModules(string pruneDevDependency) + public async Task CopiesNodeModulesInSubDirectory_ToDestinationAre_WithoutCompressedNodeModulesAsync(string pruneDevDependency) { // Arrange // Use a separate volume for output due to rsync errors @@ -180,7 +180,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-5")] - public async Task CanBuildAndRunNodeApp_OnSecondBuild_AfterZippingNodeModules_InFirstBuild() + public async Task CanBuildAndRunNodeApp_OnSecondBuild_AfterZippingNodeModules_InFirstBuildAsync() { // Arrange var appOutputDirPath = Directory.CreateDirectory(Path.Combine(_tempRootDir, Guid.NewGuid().ToString("N"))) @@ -231,7 +231,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-5")] - public async Task CanBuildAndRunNodeApp_OnSecondBuild_AfterNotZippingNodeModules_InFirstBuild() + public async Task CanBuildAndRunNodeApp_OnSecondBuild_AfterNotZippingNodeModules_InFirstBuildAsync() { // Arrange var appOutputDirPath = Directory.CreateDirectory(Path.Combine(_tempRootDir, Guid.NewGuid().ToString("N"))) @@ -282,7 +282,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-5")] - public async Task NodeStartupScript_UsesPortEnvironmentVariableValue() + public async Task NodeStartupScript_UsesPortEnvironmentVariableValueAsync() { // Arrange var nodeVersion = NodeVersion; @@ -327,7 +327,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData("ecosystem.config.js"), Trait("category", "node-14-5")] [InlineData("ecosystem.config.yaml"), Trait("category", "node-14-5")] [InlineData("ecosystem.config.yml"), Trait("category", "node-14-5")] - public async Task CanRunNodeApp_WithoutPm2_EvenThoughPm2SpecificFilesArePresentInRepo(string pm2ConfigFileName) + public async Task CanRunNodeApp_WithoutPm2_EvenThoughPm2SpecificFilesArePresentInRepoAsync(string pm2ConfigFileName) { // Arrange // NOTE: this version does not have PM2 installed and so if PM2 was used in the startup script this test @@ -374,7 +374,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-6")] - public async Task NodeStartupScript_UsesSuppliedBindingPort_EvenIfPortEnvironmentVariableValue_IsPresent() + public async Task NodeStartupScript_UsesSuppliedBindingPort_EvenIfPortEnvironmentVariableValue_IsPresentAsync() { // Arrange var nodeVersion = NodeVersion; @@ -417,7 +417,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-6")] - public async Task CanBuildAndRunNodeApp_UsingYarnForBuild_AndExplicitOutputFile() + public async Task CanBuildAndRunNodeApp_UsingYarnForBuild_AndExplicitOutputFileAsync() { // Arrange var appName = "webfrontend-yarnlock"; @@ -450,7 +450,7 @@ namespace Microsoft.Oryx.Integration.Tests // Run on Linux only as TypeScript seems to create symlinks and this does not work on Windows machines. [EnableOnPlatform("LINUX"), Trait("category", "node-14-6")] - public async Task CanBuildNodeAppUsingScriptsNodeInPackageJson() + public async Task CanBuildNodeAppUsingScriptsNodeInPackageJsonAsync() { // Arrange var appName = "NodeAndTypeScriptHelloWorld"; @@ -492,7 +492,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-6")] - public async Task Node_Lab2AppServiceApp() + public async Task Node_Lab2AppServiceAppAsync() { // Arrange var appName = "lab2-appservice"; @@ -534,7 +534,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact(Skip = "bug: 1505700")] // [Trait("category", "node-14-6")] - public async Task Node_SoundCloudNgrxApp() + public async Task Node_SoundCloudNgrxAppAsync() { // Arrange var appName = "soundcloud-ngrx"; @@ -578,7 +578,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-6")] - public async Task Node_CreateReactAppSample() + public async Task Node_CreateReactAppSampleAsync() { // Arrange var appName = "create-react-app-sample"; @@ -619,7 +619,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact(Skip = "get rid of single image, #1088920")] - public async Task Node_CreateReactAppSample_SingleImage() + public async Task Node_CreateReactAppSample_SingleImageAsync() { // Arrange var appName = "create-react-app-sample"; @@ -657,7 +657,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact(Skip = "get rid of single image, #1088920")] - public async Task CanBuildAndRun_NodeExpressApp_UsingSingleImage_AndCustomScript() + public async Task CanBuildAndRun_NodeExpressApp_UsingSingleImage_AndCustomScriptAsync() { // Arrange var appName = "linxnodeexpress"; @@ -701,7 +701,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact(Skip = "get rid of single image, #1088920")] - public async Task CanBuildAndRun_NodeExpressApp_UsingSingleImage_AndCustomStartupCommandOnly() + public async Task CanBuildAndRun_NodeExpressApp_UsingSingleImage_AndCustomStartupCommandOnlyAsync() { // Arrange var appName = "linxnodeexpress"; @@ -744,7 +744,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-6")] - public async Task CanBuildAndRunNodeApp_UsingNestedOutputDirectory() + public async Task CanBuildAndRunNodeApp_UsingNestedOutputDirectoryAsync() { // Arrange var appName = "webfrontend"; @@ -785,7 +785,7 @@ namespace Microsoft.Oryx.Integration.Tests [Fact] [Trait("category", "node-14-6")] - public async Task CanBuildAndRunNodeApp_UsingIntermediateDir_AndNestedOutputDirectory() + public async Task CanBuildAndRunNodeApp_UsingIntermediateDir_AndNestedOutputDirectoryAsync() { // Arrange var appName = "webfrontend"; diff --git a/tests/Oryx.Integration.Tests/Node/NodePostgreSqlIntegrationTests.cs b/tests/Oryx.Integration.Tests/Node/NodePostgreSqlIntegrationTests.cs index 18ec2f62d..7d4bac287 100644 --- a/tests/Oryx.Integration.Tests/Node/NodePostgreSqlIntegrationTests.cs +++ b/tests/Oryx.Integration.Tests/Node/NodePostgreSqlIntegrationTests.cs @@ -22,7 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory (Skip = "Bug 1410367")] [InlineData("github-actions")] [InlineData("latest")] - public async Task NodeApp_PostgreSqlDB(string imageTag) + public async Task NodeApp_PostgreSqlDBAsync(string imageTag) { await RunTestAsync( "nodejs", diff --git a/tests/Oryx.Integration.Tests/Node/NodePreRunCommandOrScriptTest.cs b/tests/Oryx.Integration.Tests/Node/NodePreRunCommandOrScriptTest.cs index 2294f11bf..dad4954b6 100644 --- a/tests/Oryx.Integration.Tests/Node/NodePreRunCommandOrScriptTest.cs +++ b/tests/Oryx.Integration.Tests/Node/NodePreRunCommandOrScriptTest.cs @@ -28,7 +28,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRunNodeApp_UsingPreRunCommand_WithDynamicInstall() + public async Task CanBuildAndRunNodeApp_UsingPreRunCommand_WithDynamicInstallAsync() { // Arrange var nodeVersion = NodeVersions.Node14Version; @@ -94,7 +94,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRunNodeApp_UsingPreRunScript_WithDynamicInstall() + public async Task CanBuildAndRunNodeApp_UsingPreRunScript_WithDynamicInstallAsync() { // Arrange var nodeVersion = NodeVersions.Node14Version; @@ -166,7 +166,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFile() + public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFileAsync() { // Arrange var nodeVersion = "14"; diff --git a/tests/Oryx.Integration.Tests/Node/NodeSassExampleTest.cs b/tests/Oryx.Integration.Tests/Node/NodeSassExampleTest.cs index 9dbd83d1e..d81a7cd11 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeSassExampleTest.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeSassExampleTest.cs @@ -21,7 +21,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("14"), Trait("category", "node-14")] - public async Task Test_NodeSassExample(string nodeVersion) + public async Task Test_NodeSassExampleAsync(string nodeVersion) { // Arrange var appName = "node-sass-example"; diff --git a/tests/Oryx.Integration.Tests/Node/NodeSqlServerIntegrationTests.cs b/tests/Oryx.Integration.Tests/Node/NodeSqlServerIntegrationTests.cs index 745c1dcff..0cc0004fd 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeSqlServerIntegrationTests.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeSqlServerIntegrationTests.cs @@ -29,7 +29,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("github-actions")] [InlineData("latest")] - public async Task NodeApp_MicrosoftSqlServerDB(string imageTag) + public async Task NodeApp_MicrosoftSqlServerDBAsync(string imageTag) { // Arrange var appName = "node-mssql"; diff --git a/tests/Oryx.Integration.Tests/Node/NodeTestBuildAndRunAppWithDebugger.cs b/tests/Oryx.Integration.Tests/Node/NodeTestBuildAndRunAppWithDebugger.cs index 2e6843ad4..6c3c064aa 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeTestBuildAndRunAppWithDebugger.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeTestBuildAndRunAppWithDebugger.cs @@ -25,7 +25,7 @@ namespace Microsoft.Oryx.Integration.Tests [MemberData( nameof(TestValueGenerator.GetNodeVersions_SupportDebugging), MemberType = typeof(TestValueGenerator))] - public async Task CanBuildAndRunNodeApp_WithDebugger(string nodeVersion) + public async Task CanBuildAndRunNodeApp_WithDebuggerAsync(string nodeVersion) { // Arrange var appOutputDirVolume = CreateAppOutputDirVolume(); diff --git a/tests/Oryx.Integration.Tests/Node/NodeTestUsingZippedNodeModules.cs b/tests/Oryx.Integration.Tests/Node/NodeTestUsingZippedNodeModules.cs index 9af0e0cb5..70898ac3f 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeTestUsingZippedNodeModules.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeTestUsingZippedNodeModules.cs @@ -24,7 +24,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [MemberData(nameof(TestValueGenerator.GetNodeVersions), MemberType = typeof(TestValueGenerator))] - public async Task CanBuildAndRunNodeApp_Using_TarGz_zippedNodeModules(string nodeVersion) + public async Task CanBuildAndRunNodeApp_Using_TarGz_zippedNodeModulesAsync(string nodeVersion) { // Arrange var compressFormat = "tar-gz"; @@ -70,7 +70,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("14")] - public async Task Node_CreateReactAppSample_zippedNodeModules(string nodeVersion) + public async Task Node_CreateReactAppSample_zippedNodeModulesAsync(string nodeVersion) { // Arrange // Use a separate volume for output due to rsync errors @@ -107,7 +107,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task BuildsAndRunsNodeApp_WhenPruneDevDependenciesIsTrue_AndNodeModulesAreCompressed() + public async Task BuildsAndRunsNodeApp_WhenPruneDevDependenciesIsTrue_AndNodeModulesAreCompressedAsync() { // Arrange // Use a separate volume for output due to rsync errors @@ -148,7 +148,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory(Skip = "Bug#1071724")] [InlineData("true")] [InlineData("false")] - public async Task CopiesNodeModulesInSubDirectory_ToDestination_WhenNodeModulesAreCompressed(string pruneDevDependency) + public async Task CopiesNodeModulesInSubDirectory_ToDestination_WhenNodeModulesAreCompressedAsync(string pruneDevDependency) { // Arrange // Use a separate volume for output due to rsync errors diff --git a/tests/Oryx.Integration.Tests/Node/NodeTestWithAppInsightsConfigured.cs b/tests/Oryx.Integration.Tests/Node/NodeTestWithAppInsightsConfigured.cs index c4082a6db..fd18c69bd 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeTestWithAppInsightsConfigured.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeTestWithAppInsightsConfigured.cs @@ -26,7 +26,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData("14", "enabled", ExtVarNames.UserAppInsightsConnectionStringEnv)] //Without pre-IPA bits of appInsights, UserAppInsightsExtensionVersion value will be '~2' // and that will enable oryx's appInsight attach logic - public async Task CanBuildAndRun_App_With_AgentExtension_And_InstrumentKey_Or_ConnectionString( + public async Task CanBuildAndRun_App_With_AgentExtension_And_InstrumentKey_Or_ConnectionStringAsync( string nodeVersion, string agentExtensionVersionEnvValue, string appInsightKeyOrConnectionString) @@ -90,7 +90,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData("14", "disabled", ExtVarNames.UserAppInsightsConnectionStringEnv)] //With New IPA bits of appInsights, UserAppInsightsExtensionVersion value will be '~3' // and that will disable oryx's appInsight attach logic - public async Task CanBuildAndRun_NodeApp_AppInsights_With_NewIPA_Configuration( + public async Task CanBuildAndRun_NodeApp_AppInsights_With_NewIPA_ConfigurationAsync( string nodeVersion, string agentExtensionVersionEnvValue, string appInsightKeyOrConnectionString) diff --git a/tests/Oryx.Integration.Tests/Node/NodeWebFrontEndAppTest.cs b/tests/Oryx.Integration.Tests/Node/NodeWebFrontEndAppTest.cs index 41c3a55c9..72763abe4 100644 --- a/tests/Oryx.Integration.Tests/Node/NodeWebFrontEndAppTest.cs +++ b/tests/Oryx.Integration.Tests/Node/NodeWebFrontEndAppTest.cs @@ -22,7 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [MemberData(nameof(TestValueGenerator.GetNodeVersions), MemberType = typeof(TestValueGenerator))] - public async Task CanBuildAndRun_NodeWebFrontEndApp(string nodeVersion) + public async Task CanBuildAndRun_NodeWebFrontEndAppAsync(string nodeVersion) { // Arrange var appName = "webfrontend"; @@ -67,7 +67,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("webfrontend")] [InlineData("webfrontend-yarnlock")] - public async Task CanBuildAndRun_NodeWebFrontEndApp_WhenPruneDevDependenciesIsTrue(string appName) + public async Task CanBuildAndRun_NodeWebFrontEndApp_WhenPruneDevDependenciesIsTrueAsync(string appName) { // Arrange var nodeVersion = "14"; @@ -112,7 +112,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_NodeWebFrontEndApp_AfterRebuild_WhenPruneDevDependenciesIsTrue() + public async Task CanBuildAndRun_NodeWebFrontEndApp_AfterRebuild_WhenPruneDevDependenciesIsTrueAsync() { // Arrange var nodeVersion = "14"; diff --git a/tests/Oryx.Integration.Tests/Php/PhpDynamicInstallationTest.cs b/tests/Oryx.Integration.Tests/Php/PhpDynamicInstallationTest.cs index b35cca3c6..4b60f5e5b 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpDynamicInstallationTest.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpDynamicInstallationTest.cs @@ -13,6 +13,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] public class PhpDynamicInstallationTest : PhpEndToEndTestsBase { public PhpDynamicInstallationTest(ITestOutputHelper output, TestTempDirTestFixture fixture) @@ -24,21 +25,21 @@ namespace Microsoft.Oryx.Integration.Tests // platform-version in it's own pipeline agent. This is // because our agents currently a space limit of 10GB. [Fact, Trait("category", "php-8.0")] - public void PipelineTestInvocationsPhp80() + public async Task PipelineTestInvocationsPhp80Async() { - CanBuildAndRunApp("8.0"); + await CanBuildAndRunAppAsync("8.0"); } [Fact, Trait("category", "php-7.4")] - public void PipelineTestInvocationsPhp74() + public async Task PipelineTestInvocationsPhp74Async() { - CanBuildAndRunApp("7.4"); + await CanBuildAndRunAppAsync("7.4"); } [Theory] [InlineData("8.0")] [InlineData("7.4")] - public async Task CanBuildAndRunApp(string phpVersion) + public async Task CanBuildAndRunAppAsync(string phpVersion) { // Arrange var exifImageTypePng = "3"; diff --git a/tests/Oryx.Integration.Tests/Php/PhpExifTest.cs b/tests/Oryx.Integration.Tests/Php/PhpExifTest.cs index 7e4ac2b50..34b818fa7 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpExifTest.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpExifTest.cs @@ -13,6 +13,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] public class PhpExifTest : PhpEndToEndTestsBase { private const string ExifImageTypePng = "3"; @@ -26,25 +27,27 @@ namespace Microsoft.Oryx.Integration.Tests // platform-version in it's own pipeline agent. This is // because our agents currently a space limit of 10GB. [Fact, Trait("category", "php-8.0")] - public void PipelineTestInvocationsPhp80() + public async Task PipelineTestInvocationsPhp80Async() { string phpVersion80 = "8.0"; - ExifExample(phpVersion80); - PhpFpmExifExample(phpVersion80); + await Task.WhenAll( + ExifExampleAsync(phpVersion80), + PhpFpmExifExampleAsync(phpVersion80)); } [Fact, Trait("category", "php-7.4")] - public void PipelineTestInvocationsPhp74() + public async Task PipelineTestInvocationsPhp74Async() { string phpVersion74 = "7.4"; - ExifExample(phpVersion74); - PhpFpmExifExample(phpVersion74); + await Task.WhenAll( + ExifExampleAsync(phpVersion74), + PhpFpmExifExampleAsync(phpVersion74)); } [Theory] [InlineData("8.0")] [InlineData("7.4")] - public async Task ExifExample(string phpVersion) + public async Task ExifExampleAsync(string phpVersion) { // Arrange var appName = "exif-example"; @@ -80,7 +83,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("8.0")] [InlineData("7.4")] - public async Task PhpFpmExifExample(string phpVersion) + public async Task PhpFpmExifExampleAsync(string phpVersion) { // Arrange var appName = "exif-example"; diff --git a/tests/Oryx.Integration.Tests/Php/PhpGdTest.cs b/tests/Oryx.Integration.Tests/Php/PhpGdTest.cs index eaf406555..9059ff581 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpGdTest.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpGdTest.cs @@ -13,6 +13,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] public class PhpGdTest : PhpEndToEndTestsBase { public PhpGdTest(ITestOutputHelper output, TestTempDirTestFixture fixture) @@ -24,25 +25,27 @@ namespace Microsoft.Oryx.Integration.Tests // platform-version in it's own pipeline agent. This is // because our agents currently a space limit of 10GB. [Fact, Trait("category", "php-8.0")] - public void PipelineTestInvocationsPhp80() + public async Task PipelineTestInvocationsPhp80Async() { string phpVersion80 = "8.0"; - GdExample(phpVersion80); - PhpFpmGdExample(phpVersion80); + await Task.WhenAll( + GdExampleAsync(phpVersion80), + PhpFpmGdExampleAsync(phpVersion80)); } [Fact, Trait("category", "php-7.4")] - public void PipelineTestInvocationsPhp74() + public async Task PipelineTestInvocationsPhp74Async() { string phpVersion74 = "7.4"; - GdExample(phpVersion74); - PhpFpmGdExample(phpVersion74); + await Task.WhenAll( + GdExampleAsync(phpVersion74), + PhpFpmGdExampleAsync(phpVersion74)); } [Theory] [InlineData("8.0")] [InlineData("7.4")] - public async Task GdExample(string phpVersion) + public async Task GdExampleAsync(string phpVersion) { // Arrange var appName = "gd-example"; @@ -78,7 +81,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("8.0")] [InlineData("7.4")] - public async Task PhpFpmGdExample(string phpVersion) + public async Task PhpFpmGdExampleAsync(string phpVersion) { // Arrange var appName = "gd-example"; diff --git a/tests/Oryx.Integration.Tests/Php/PhpGreetingsAppTest.cs b/tests/Oryx.Integration.Tests/Php/PhpGreetingsAppTest.cs index d72358087..37eecc5c9 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpGreetingsAppTest.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpGreetingsAppTest.cs @@ -12,6 +12,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] public class PhpGreetingsAppTest : PhpEndToEndTestsBase { private const string ExifImageDebianFlavorPng = "3"; @@ -25,25 +26,27 @@ namespace Microsoft.Oryx.Integration.Tests // platform-version in it's own pipeline agent. This is // because our agents currently a space limit of 10GB. [Fact, Trait("category", "php-8.0")] - public void PipelineTestInvocationsPhp80() + public async Task PipelineTestInvocationsPhp80Async() { string phpVersion80 = "8.0"; - GreetingsAppTest(phpVersion80); - PhpFpmGreetingsAppTest(phpVersion80); + await Task.WhenAll( + GreetingsAppTestAsync(phpVersion80), + PhpFpmGreetingsAppTestAsync(phpVersion80)); } [Fact, Trait("category", "php-7.4")] - public void PipelineTestInvocationsPhp74() + public async Task PipelineTestInvocationsPhp74Async() { string phpVersion74 = "7.4"; - GreetingsAppTest(phpVersion74); - PhpFpmGreetingsAppTest(phpVersion74); + await Task.WhenAll( + GreetingsAppTestAsync(phpVersion74), + PhpFpmGreetingsAppTestAsync(phpVersion74)); } [Theory] [InlineData("8.0")] [InlineData("7.4")] - public async Task GreetingsAppTest(string phpVersion) + public async Task GreetingsAppTestAsync(string phpVersion) { // Arrange var appName = "greetings"; @@ -79,7 +82,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("8.0")] [InlineData("7.4")] - public async Task PhpFpmGreetingsAppTest(string phpVersion) + public async Task PhpFpmGreetingsAppTestAsync(string phpVersion) { // Arrange var appName = "greetings"; diff --git a/tests/Oryx.Integration.Tests/Php/PhpImagickExampleTest.cs b/tests/Oryx.Integration.Tests/Php/PhpImagickExampleTest.cs index 70e4044a4..5ad62365b 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpImagickExampleTest.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpImagickExampleTest.cs @@ -13,6 +13,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] public class PhpImagickExampleTest : PhpEndToEndTestsBase { public PhpImagickExampleTest(ITestOutputHelper output, TestTempDirTestFixture fixture) @@ -23,25 +24,18 @@ namespace Microsoft.Oryx.Integration.Tests // Unique category traits are needed to run each // platform-version in it's own pipeline agent. This is // because our agents currently a space limit of 10GB. - [Fact, Trait("category", "php-8.0")] - public void PipelineTestInvocationsPhp80() - { - string phpVersion80 = "8.0"; - ImagickExample(phpVersion80); - PhpFpmImagickExample(phpVersion80); - } - [Fact, Trait("category", "php-7.4")] - public void PipelineTestInvocationsPhp74() + public async Task PipelineTestInvocationsPhp74Async() { string phpVersion74 = "7.4"; - ImagickExample(phpVersion74); - PhpFpmImagickExample(phpVersion74); + await Task.WhenAll( + ImagickExampleAsync(phpVersion74), + PhpFpmImagickExampleAsync(phpVersion74)); } [Theory] [InlineData("7.4")] - public async Task ImagickExample(string phpVersion) + public async Task ImagickExampleAsync(string phpVersion) { // Arrange var appName = "imagick-example"; @@ -75,7 +69,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("7.4")] - public async Task PhpFpmImagickExample(string phpVersion) + public async Task PhpFpmImagickExampleAsync(string phpVersion) { // Arrange var appName = "imagick-example"; diff --git a/tests/Oryx.Integration.Tests/Php/PhpMySqlIntegrationTests.cs b/tests/Oryx.Integration.Tests/Php/PhpMySqlIntegrationTests.cs index 0e67ddb87..087c5a7c7 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpMySqlIntegrationTests.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpMySqlIntegrationTests.cs @@ -10,6 +10,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] [Trait("db", "mysql")] public class PhpMySqlIntegrationTests : DatabaseTestsBase, IClassFixture { @@ -22,17 +23,18 @@ namespace Microsoft.Oryx.Integration.Tests // platform-version in it's own pipeline agent. This is // because our agents currently a space limit of 10GB. [Fact, Trait("category", "php-7.4")] - public void PipelineTestInvocationsPhp74() + public async Task PipelineTestInvocationsPhp74Async() { string phpVersion74 = "7.4"; - PhpApp_UsingMysqli(phpVersion74, "latest"); - PhpApp_UsingMysqli(phpVersion74, "github-actions"); + await Task.WhenAll( + PhpApp_UsingMysqliAsync(phpVersion74, "latest"), + PhpApp_UsingMysqliAsync(phpVersion74, "github-actions")); } [Theory] [InlineData("7.4", "latest")] [InlineData("7.4", "github-actions")] - public async Task PhpApp_UsingMysqli(string phpVersion, string imageTag) + public async Task PhpApp_UsingMysqliAsync(string phpVersion, string imageTag) { await RunTestAsync( "php", diff --git a/tests/Oryx.Integration.Tests/Php/PhpPostgreSqlIntegrationTests.cs b/tests/Oryx.Integration.Tests/Php/PhpPostgreSqlIntegrationTests.cs index 3ab5f540a..279d5bc30 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpPostgreSqlIntegrationTests.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpPostgreSqlIntegrationTests.cs @@ -10,6 +10,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] [Trait("category", "php-7.4")] [Trait("db", "postgres")] public class PhpPostgreSqlIntegrationTests : DatabaseTestsBase, IClassFixture @@ -21,7 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory(Skip = "Bug 1410367") ] [InlineData("7.4")] - public async Task PhpApp(string phpVersion) + public async Task PhpAppAsync(string phpVersion) { await RunTestAsync( "php", diff --git a/tests/Oryx.Integration.Tests/Php/PhpPreRunCommandOrScriptTest.cs b/tests/Oryx.Integration.Tests/Php/PhpPreRunCommandOrScriptTest.cs index d8d1e7c46..0fd53fe54 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpPreRunCommandOrScriptTest.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpPreRunCommandOrScriptTest.cs @@ -14,6 +14,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] [Trait("category", "php-7.4")] public class PhpPreRunCommandOrScriptTest : PhpEndToEndTestsBase { @@ -23,7 +24,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task TwigExampleCanBuildAndRun_UsingPreRunCommand() + public async Task TwigExampleCanBuildAndRun_UsingPreRunCommandAsync() { // Arrange var phpVersion = "7.4"; @@ -69,7 +70,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task TwigExampleCanBuildAndRun_UsingPreRunScript() + public async Task TwigExampleCanBuildAndRun_UsingPreRunScriptAsync() { // Arrange var phpVersion = "7.4"; @@ -119,7 +120,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task TwigExampleCanBuildAndRun_UsingPreRunScriptToInstallExtension() + public async Task TwigExampleCanBuildAndRun_UsingPreRunScriptToInstallExtensionAsync() { // Arrange var phpVersion = "7.4"; @@ -173,7 +174,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFile() + public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFileAsync() { // Arrange var phpVersion = "7.4"; diff --git a/tests/Oryx.Integration.Tests/Php/PhpSqlServerIntegrationTests.cs b/tests/Oryx.Integration.Tests/Php/PhpSqlServerIntegrationTests.cs index 3f1c773cc..75efa7a96 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpSqlServerIntegrationTests.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpSqlServerIntegrationTests.cs @@ -15,6 +15,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] [Trait("db", "sqlserver")] public class PhpSqlServerIntegrationTests : PlatformEndToEndTestsBase { @@ -29,21 +30,23 @@ namespace Microsoft.Oryx.Integration.Tests // platform-version in it's own pipeline agent. This is // because our agents currently a space limit of 10GB. [Fact, Trait("category", "php-8.0")] - public void PipelineTestInvocationsPhp80() + public async Task PipelineTestInvocationsPhp80Async() { string phpVersion80 = "8.0"; - PhpApp_UsingPdo(phpVersion80, "github-actions"); - PhpApp_UsingPdo(phpVersion80, "github-buster"); - PhpApp_UsingPdo(phpVersion80, "latest"); + await Task.WhenAll( + PhpApp_UsingPdoAsync(phpVersion80, "github-actions"), + PhpApp_UsingPdoAsync(phpVersion80, "github-actions-buster"), + PhpApp_UsingPdoAsync(phpVersion80, "latest")); } [Fact, Trait("category", "php-7.4")] - public void PipelineTestInvocationsPhp74() + public async Task PipelineTestInvocationsPhp74Async() { string phpVersion74 = "7.4"; - PhpApp_UsingPdo(phpVersion74, "github-actions"); - PhpApp_UsingPdo(phpVersion74, "github-buster"); - PhpApp_UsingPdo(phpVersion74, "latest"); + await Task.WhenAll( + PhpApp_UsingPdoAsync(phpVersion74, "github-actions"), + PhpApp_UsingPdoAsync(phpVersion74, "github-actions-buster"), + PhpApp_UsingPdoAsync(phpVersion74, "latest")); } [Theory] @@ -53,7 +56,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData("8.0", "github-actions")] [InlineData("8.0", "github-actions-buster")] [InlineData("8.0", "latest")] - public async Task PhpApp_UsingPdo(string phpVersion, string imageTag) + public async Task PhpApp_UsingPdoAsync(string phpVersion, string imageTag) { // Arrange var appName = "sqlsrv-example"; diff --git a/tests/Oryx.Integration.Tests/Php/PhpTwigExampleTest.cs b/tests/Oryx.Integration.Tests/Php/PhpTwigExampleTest.cs index 5d9046c5b..4902ebbb5 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpTwigExampleTest.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpTwigExampleTest.cs @@ -13,6 +13,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] public class PhpTwigExampleTest : PhpEndToEndTestsBase { public PhpTwigExampleTest(ITestOutputHelper output, TestTempDirTestFixture fixture) @@ -24,26 +25,28 @@ namespace Microsoft.Oryx.Integration.Tests // platform-version in it's own pipeline agent. This is // because our agents currently a space limit of 10GB. [Fact, Trait("category", "php-8.0")] - public void PipelineTestInvocationsPhp80() + public async Task PipelineTestInvocationsPhp80Async() { string phpVersion80 = "8.0"; - TwigExample(phpVersion80); - PhpFpmTwigExample(phpVersion80); + await Task.WhenAll( + TwigExampleAsync(phpVersion80), + PhpFpmTwigExampleAsync(phpVersion80)); } [Fact, Trait("category", "php-7.4")] - public void PipelineTestInvocationsPhp74() + public async Task PipelineTestInvocationsPhp74Async() { string phpVersion74 = "7.4"; - TwigExample(phpVersion74); - PhpFpmTwigExample(phpVersion74); + await Task.WhenAll( + TwigExampleAsync(phpVersion74), + PhpFpmTwigExampleAsync(phpVersion74)); } [Theory] [InlineData("8.0")] [InlineData("7.4")] // Twig does not support PHP < 7 - public async Task TwigExample(string phpVersion) + public async Task TwigExampleAsync(string phpVersion) { // Arrange var appName = "twig-example"; @@ -79,7 +82,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData("8.0")] [InlineData("7.4")] // Twig does not support PHP < 7 - public async Task PhpFpmTwigExample(string phpVersion) + public async Task PhpFpmTwigExampleAsync(string phpVersion) { // Arrange var appName = "twig-example"; diff --git a/tests/Oryx.Integration.Tests/Php/PhpWordPressFpmTest.cs b/tests/Oryx.Integration.Tests/Php/PhpWordPressFpmTest.cs index 7d281f9f1..9e9beed20 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpWordPressFpmTest.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpWordPressFpmTest.cs @@ -16,6 +16,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] public class PhpWordPressFpmTest : PhpEndToEndTestsBase { public PhpWordPressFpmTest(ITestOutputHelper output, TestTempDirTestFixture fixture) @@ -27,21 +28,21 @@ namespace Microsoft.Oryx.Integration.Tests // platform-version in it's own pipeline agent. This is // because our agents currently a space limit of 10GB. [Fact, Trait("category", "php-8.0")] - public void PipelineTestInvocationsPhp80() + public async Task PipelineTestInvocationsPhp80Async() { - PhpFpmWithWordPress56("8.0-fpm"); + await PhpFpmWithWordPress56Async("8.0-fpm"); } [Fact, Trait("category", "php-7.4")] - public void PipelineTestInvocationsPhp74() + public async Task PipelineTestInvocationsPhp74Async() { - PhpFpmWithWordPress56("7.4-fpm"); + await PhpFpmWithWordPress56Async("7.4-fpm"); } [Theory] [InlineData("8.0-fpm")] [InlineData("7.4-fpm")] - public async Task PhpFpmWithWordPress56(string phpVersion) + public async Task PhpFpmWithWordPress56Async(string phpVersion) { // Arrange string hostDir = Path.Combine(_tempRootDir, Guid.NewGuid().ToString("N")); diff --git a/tests/Oryx.Integration.Tests/Php/PhpWordPressTest.cs b/tests/Oryx.Integration.Tests/Php/PhpWordPressTest.cs index ccc09a923..24bd63b7b 100644 --- a/tests/Oryx.Integration.Tests/Php/PhpWordPressTest.cs +++ b/tests/Oryx.Integration.Tests/Php/PhpWordPressTest.cs @@ -16,6 +16,7 @@ using Xunit.Abstractions; namespace Microsoft.Oryx.Integration.Tests { + [Collection("Php integration")] public class PhpWordPressTest : PhpEndToEndTestsBase { public PhpWordPressTest(ITestOutputHelper output, TestTempDirTestFixture fixture) @@ -27,25 +28,24 @@ namespace Microsoft.Oryx.Integration.Tests // platform-version in it's own pipeline agent. This is // because our agents currently a space limit of 10GB. [Fact, Trait("category", "php-8.0")] - public void PipelineTestInvocationsPhp80() + public async Task PipelineTestInvocationsPhp80Async() { string phpVersion80 = "8.0"; - PhpWithWordPress51(phpVersion80); - CanBuildAndRun_Wordpress_SampleApp(phpVersion80); + await CanBuildAndRun_Wordpress_SampleAppAsync(phpVersion80); } [Fact, Trait("category", "php-7.4")] - public void PipelineTestInvocationsPhp74() + public async Task PipelineTestInvocationsPhp74Async() { string phpVersion74 = "7.4"; - PhpWithWordPress51(phpVersion74); - CanBuildAndRun_Wordpress_SampleApp(phpVersion74); + await Task.WhenAll( + PhpWithWordPress51Async(phpVersion74), + CanBuildAndRun_Wordpress_SampleAppAsync(phpVersion74)); } [Theory] - [InlineData("8.0")] [InlineData("7.4")] - public async Task PhpWithWordPress51(string phpVersion) + public async Task PhpWithWordPress51Async(string phpVersion) { // Arrange string hostDir = Path.Combine(_tempRootDir, Guid.NewGuid().ToString("N")); @@ -94,7 +94,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("8.0")] [InlineData("7.4")] - public async Task CanBuildAndRun_Wordpress_SampleApp(string phpVersion) + public async Task CanBuildAndRun_Wordpress_SampleAppAsync(string phpVersion) { // Arrange var appName = "wordpress-example"; diff --git a/tests/Oryx.Integration.Tests/Python/Python37EndToEndTests.cs b/tests/Oryx.Integration.Tests/Python/Python37EndToEndTests.cs index 965d5ae71..baf6befb7 100644 --- a/tests/Oryx.Integration.Tests/Python/Python37EndToEndTests.cs +++ b/tests/Oryx.Integration.Tests/Python/Python37EndToEndTests.cs @@ -25,7 +25,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("3.7")] - public async Task CanBuildAndRunPythonApp(string pythonVersion) + public async Task CanBuildAndRunPythonAppAsync(string pythonVersion) { // Arrange var appName = "django-app"; @@ -68,7 +68,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRunPythonApp_UsingPython37_AndVirtualEnv() + public async Task CanBuildAndRunPythonApp_UsingPython37_AndVirtualEnvAsync() { // Arrange var appName = "django-app"; @@ -124,7 +124,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("tar-gz", "tar.gz")] [InlineData("zip", "zip")] - public async Task CanBuildAndRunPythonApp_UsingPython37_AndCompressedVirtualEnv( + public async Task CanBuildAndRunPythonApp_UsingPython37_AndCompressedVirtualEnvAsync( string compressOption, string expectedCompressFileNameExtension) { @@ -182,7 +182,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRunPythonApp_UsingCustomManifestFileLocation() + public async Task CanBuildAndRunPythonApp_UsingCustomManifestFileLocationAsync() { // Arrange var appName = "django-app"; @@ -244,7 +244,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_DjangoApp_DoingCollectStaticByDefault() + public async Task CanBuildAndRun_DjangoApp_DoingCollectStaticByDefaultAsync() { // Arrange var appName = "django-app"; @@ -296,7 +296,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_DjangoPython37App_UsingVirtualEnv() + public async Task CanBuildAndRun_DjangoPython37App_UsingVirtualEnvAsync() { // Arrange var appName = "django-app"; @@ -352,7 +352,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRunPythonApp_WhenAllOutputIsCompressed() + public async Task CanBuildAndRunPythonApp_WhenAllOutputIsCompressedAsync() { // Arrange var appName = "django-app"; diff --git a/tests/Oryx.Integration.Tests/Python/PythonBackwardCompatibilityTests.cs b/tests/Oryx.Integration.Tests/Python/PythonBackwardCompatibilityTests.cs index 99a1cd118..1fc86803c 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonBackwardCompatibilityTests.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonBackwardCompatibilityTests.cs @@ -21,7 +21,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanRunPythonApp_UsingEarlierBuiltPackagesDirectory() + public async Task CanRunPythonApp_UsingEarlierBuiltPackagesDirectoryAsync() { // This is AppService's scenario where previously built apps can still run // fine. @@ -77,7 +77,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanRunPythonApp_WithoutBuildManifestFile() + public async Task CanRunPythonApp_WithoutBuildManifestFileAsync() { // This is AppService's scenario where previously built apps can still run // fine. diff --git a/tests/Oryx.Integration.Tests/Python/PythonCustomStartUpCommandTest.cs b/tests/Oryx.Integration.Tests/Python/PythonCustomStartUpCommandTest.cs index 9d99cc7e8..220237f61 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonCustomStartUpCommandTest.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonCustomStartUpCommandTest.cs @@ -22,7 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("3.8")] - public async Task CanBuildAndRunPythonApp_UsingCustomStartUpScript(string pythonVersion) + public async Task CanBuildAndRunPythonApp_UsingCustomStartUpScriptAsync(string pythonVersion) { // Arrange var appName = "http-server-py"; @@ -72,7 +72,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("3.8")] - public async Task CanBuildAndRunPythonApp_UsingCustomStartUpCommand(string pythonVersion) + public async Task CanBuildAndRunPythonApp_UsingCustomStartUpCommandAsync(string pythonVersion) { // Arrange var appName = "http-server-py"; diff --git a/tests/Oryx.Integration.Tests/Python/PythonDebuggingTests.cs b/tests/Oryx.Integration.Tests/Python/PythonDebuggingTests.cs index 7d5724ac4..b65a2e604 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonDebuggingTests.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonDebuggingTests.cs @@ -25,7 +25,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("3.7", 5637)] // Test with a non-default port as well - public async Task CanBuildAndDebugFlaskApp(string pythonVersion, int? debugPort = null) + public async Task CanBuildAndDebugFlaskAppAsync(string pythonVersion, int? debugPort = null) { // Arrange var appName = "flask-app"; @@ -57,7 +57,7 @@ namespace Microsoft.Oryx.Integration.Tests // Send an Initialize request to make sure the debugger is running using (var debugClient = new SimpleDAPClient("127.0.0.1", ptvsdHostPort, "oryxtests")) { - string initResponse = await debugClient.Initialize(); + string initResponse = await debugClient.InitializeAsync(); // Deliberately weak assertion; don't care what's in the response, only that there IS a response Assert.False(string.IsNullOrEmpty(initResponse)); } @@ -66,7 +66,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("3.7", 5637)] // Test with a non-default port as well - public async Task CanBuildAndDebugFlaskAppWithDebugPy(string pythonVersion, int? debugPort = null) + public async Task CanBuildAndDebugFlaskAppWithDebugPyAsync(string pythonVersion, int? debugPort = null) { // Arrange var appName = "flask-app"; @@ -98,7 +98,7 @@ namespace Microsoft.Oryx.Integration.Tests // Send an Initialize request to make sure the debugger is running using (var debugClient = new SimpleDAPClient("127.0.0.1", debugPyHostPort, "oryxtests")) { - string initResponse = await debugClient.Initialize(); + string initResponse = await debugClient.InitializeAsync(); // Deliberately weak assertion; don't care what's in the response, only that there IS a response Assert.False(string.IsNullOrEmpty(initResponse)); } diff --git a/tests/Oryx.Integration.Tests/Python/PythonDjangoAppTests.cs b/tests/Oryx.Integration.Tests/Python/PythonDjangoAppTests.cs index ca6e547ff..718ad3514 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonDjangoAppTests.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonDjangoAppTests.cs @@ -22,7 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_MultiPlatformApp_HavingReactAndDjango() + public async Task CanBuildAndRun_MultiPlatformApp_HavingReactAndDjangoAsync() { // Arrange var appName = "reactdjango"; diff --git a/tests/Oryx.Integration.Tests/Python/PythonDynamicInstallationTest.cs b/tests/Oryx.Integration.Tests/Python/PythonDynamicInstallationTest.cs index 8e74dba6e..bbb144880 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonDynamicInstallationTest.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonDynamicInstallationTest.cs @@ -27,7 +27,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData("3.7")] [InlineData("3.8")] [InlineData("3.9")] - public async Task CanBuildAndRunPythonApp(string pythonVersion) + public async Task CanBuildAndRunPythonAppAsync(string pythonVersion) { // Arrange var appName = "flask-app"; @@ -71,7 +71,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData(PythonVersions.Python37Version)] [InlineData(PythonVersions.Python38Version)] [InlineData(PythonVersions.Python39Version)] - public async Task CanBuildAndRunPythonApp_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallation( + public async Task CanBuildAndRunPythonApp_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync( string pythonVersion) { // Arrange @@ -111,7 +111,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Theory] [InlineData(PythonVersions.Python310Version)] - public async Task CanBuildAndRunPythonApp_UsingGitHubActionsBullseyeBuildImage_AndDynamicRuntimeInstallation( + public async Task CanBuildAndRunPythonApp_UsingGitHubActionsBullseyeBuildImage_AndDynamicRuntimeInstallationAsync( string pythonVersion) { // Arrange @@ -161,7 +161,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRunPythonApp_UsingScriptCommandAndSetEnvSwitch() + public async Task CanBuildAndRunPythonApp_UsingScriptCommandAndSetEnvSwitchAsync() { // Arrange var pythonVersion = "3.7"; @@ -213,7 +213,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory(Skip = "Temporarily skip, Bug#1266781")] [InlineData(true)] [InlineData(false)] - public async Task CanBuildAndRunPythonAppWhenUsingPackageDirSwitch(bool compressDestinationDir) + public async Task CanBuildAndRunPythonAppWhenUsingPackageDirSwitchAsync(bool compressDestinationDir) { // Arrange var pythonVersion = "3.7"; diff --git a/tests/Oryx.Integration.Tests/Python/PythonEndToEndTests.cs b/tests/Oryx.Integration.Tests/Python/PythonEndToEndTests.cs index eb06b9ebd..49baf3819 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonEndToEndTests.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonEndToEndTests.cs @@ -22,7 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task CanBuildAndRun_Tweeter3App() + public async Task CanBuildAndRun_Tweeter3AppAsync() { // Arrange var appName = "tweeter3"; @@ -67,7 +67,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [InlineData("3.7")] - public async Task BuildWithVirtualEnv_RemovesOryxPackagesDir_FromOlderBuild(string pythonVersion) + public async Task BuildWithVirtualEnv_RemovesOryxPackagesDir_FromOlderBuildAsync(string pythonVersion) { // Arrange var appName = "django-app"; @@ -123,7 +123,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory (Skip = "Bug 1410367")] [InlineData("3.7")] [InlineData("3.8")] - public async Task BuildWithVirtualEnv_From_File_Requirement_Txt(string pythonVersion) + public async Task BuildWithVirtualEnv_From_File_Requirement_TxtAsync(string pythonVersion) { // This is to test if we can build and run an app when both the files requirement.txt // and setup.py are provided, we tend to prioritize the root level requirement.txt @@ -163,7 +163,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact(Skip = "Bug 1410367") ] - public async Task CanBuildAndRunPythonApp_UsingOutputDirectory_NestedUnderSourceDirectory() + public async Task CanBuildAndRunPythonApp_UsingOutputDirectory_NestedUnderSourceDirectoryAsync() { // Arrange var appName = "flask-app"; @@ -206,7 +206,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact (Skip = "Bug 1410367")] - public async Task CanBuildAndRunPythonApp_UsingIntermediateDir_AndNestedOutputDirectory() + public async Task CanBuildAndRunPythonApp_UsingIntermediateDir_AndNestedOutputDirectoryAsync() { // Arrange var appName = "flask-app"; diff --git a/tests/Oryx.Integration.Tests/Python/PythonGunicornMultiWorkersTest.cs b/tests/Oryx.Integration.Tests/Python/PythonGunicornMultiWorkersTest.cs index 0b277a521..514619300 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonGunicornMultiWorkersTest.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonGunicornMultiWorkersTest.cs @@ -20,7 +20,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact(Skip = "work item #1122020")] - public async Task CanBuildAndRunPythonApp_UsingGunicornMultipleWorkers() + public async Task CanBuildAndRunPythonApp_UsingGunicornMultipleWorkersAsync() { // Arrange var pythonVersion = "3.7"; diff --git a/tests/Oryx.Integration.Tests/Python/PythonMySqlIntegrationTests.cs b/tests/Oryx.Integration.Tests/Python/PythonMySqlIntegrationTests.cs index 5735dfbb1..971b44265 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonMySqlIntegrationTests.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonMySqlIntegrationTests.cs @@ -26,7 +26,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData("mysql-mysqlconnector-sample", "github-actions")] [InlineData("mysql-mysqlclient-sample", "latest")] [InlineData("mysql-mysqlclient-sample", "github-actions")] - public async Task Python37App_MySqlDB_UsingPyMySql_UsingLtsVersionsBuildImage( + public async Task Python37App_MySqlDB_UsingPyMySql_UsingLtsVersionsBuildImageAsync( string sampleAppName, string imageTag) { @@ -41,7 +41,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData("mysql-pymysql-sample", "github-actions-buster")] [InlineData("mysql-mysqlconnector-sample", "github-actions-buster")] [InlineData("mysql-mysqlclient-sample", "github-actions-buster")] - public async Task Python39App_MySqlDB_UsingPyMySql_UsingBusterBuildImage( + public async Task Python39App_MySqlDB_UsingPyMySql_UsingBusterBuildImageAsync( string sampleAppName, string imageTag) { diff --git a/tests/Oryx.Integration.Tests/Python/PythonPortEnvironmentVariableTests.cs b/tests/Oryx.Integration.Tests/Python/PythonPortEnvironmentVariableTests.cs index b62a5e7cb..1d1d34ac0 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonPortEnvironmentVariableTests.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonPortEnvironmentVariableTests.cs @@ -21,7 +21,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task PythonStartupScript_UsesPortEnvironmentVariableValue() + public async Task PythonStartupScript_UsesPortEnvironmentVariableValueAsync() { // Arrange var appName = "django-app"; @@ -74,7 +74,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact] - public async Task PythonStartupScript_UsesSuppliedBindingPort_EvenIfPortEnvironmentVariableValue_IsPresent() + public async Task PythonStartupScript_UsesSuppliedBindingPort_EvenIfPortEnvironmentVariableValue_IsPresentAsync() { // Arrange var appName = "django-app"; diff --git a/tests/Oryx.Integration.Tests/Python/PythonPostgreSqlIntegrationTests.cs b/tests/Oryx.Integration.Tests/Python/PythonPostgreSqlIntegrationTests.cs index ea53ce328..2679996a5 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonPostgreSqlIntegrationTests.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonPostgreSqlIntegrationTests.cs @@ -23,7 +23,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData("github-actions")] [InlineData("github-actions-buster")] [InlineData("latest")] - public async Task Python37App_PostgreSqlDB(string imageTag) + public async Task Python37App_PostgreSqlDBAsync(string imageTag) { await RunTestAsync( "python", diff --git a/tests/Oryx.Integration.Tests/Python/PythonPreRunCommandOrScriptTest.cs b/tests/Oryx.Integration.Tests/Python/PythonPreRunCommandOrScriptTest.cs index 37195b022..4e51677e7 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonPreRunCommandOrScriptTest.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonPreRunCommandOrScriptTest.cs @@ -28,7 +28,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact(Skip = "Bug 1410367") ] - public async Task CanBuildAndRunPythonApp_UsingPreRunCommand_WithDynamicInstall() + public async Task CanBuildAndRunPythonApp_UsingPreRunCommand_WithDynamicInstallAsync() { // Arrange var pythonVersion = "3.7"; @@ -86,7 +86,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact(Skip = "Bug 1410367") ] - public async Task CanBuildAndRunPythonApp_UsingPreRunScript_WithDynamicInstall() + public async Task CanBuildAndRunPythonApp_UsingPreRunScript_WithDynamicInstallAsync() { // Arrange var pythonVersion = "3.7"; @@ -151,7 +151,7 @@ namespace Microsoft.Oryx.Integration.Tests } [Fact (Skip = "Bug 1410367")] - public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFile() + public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFileAsync() { // Arrange var version = "3.8"; diff --git a/tests/Oryx.Integration.Tests/Python/PythonShapelyAppTests.cs b/tests/Oryx.Integration.Tests/Python/PythonShapelyAppTests.cs index 35c912af3..ecf460ef4 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonShapelyAppTests.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonShapelyAppTests.cs @@ -22,7 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [MemberData(nameof(TestValueGenerator.GetPythonVersions), MemberType = typeof(TestValueGenerator))] - public async Task CanBuildAndRun_ShapelyFlaskApp_UsingVirtualEnv(string pythonVersion) + public async Task CanBuildAndRun_ShapelyFlaskApp_UsingVirtualEnvAsync(string pythonVersion) { // Arrange var appName = "shapely-flask-app"; @@ -67,7 +67,7 @@ namespace Microsoft.Oryx.Integration.Tests [Theory] [MemberData(nameof(TestValueGenerator.GetPythonVersions), MemberType = typeof(TestValueGenerator))] - public async Task CanBuildAndRun_ShapelyFlaskApp_PackageDir(string pythonVersion) + public async Task CanBuildAndRun_ShapelyFlaskApp_PackageDirAsync(string pythonVersion) { // Arrange const string packageDir = "orx_packages"; diff --git a/tests/Oryx.Integration.Tests/Python/PythonSqlServerIntegrationTests.cs b/tests/Oryx.Integration.Tests/Python/PythonSqlServerIntegrationTests.cs index 0ed28146a..b5255620e 100644 --- a/tests/Oryx.Integration.Tests/Python/PythonSqlServerIntegrationTests.cs +++ b/tests/Oryx.Integration.Tests/Python/PythonSqlServerIntegrationTests.cs @@ -30,7 +30,7 @@ namespace Microsoft.Oryx.Integration.Tests [InlineData("github-actions")] [InlineData("github-actions-buster")] [InlineData("latest")] - public async Task Python37App_MicrosoftSqlServerDB(string imageTag) + public async Task Python37App_MicrosoftSqlServerDBAsync(string imageTag) { // Arrange var appName = "mssqlserver-sample"; diff --git a/tests/Oryx.Integration.Tests/VSCodeDebugProtocol/SimpleDAPClient.cs b/tests/Oryx.Integration.Tests/VSCodeDebugProtocol/SimpleDAPClient.cs index a1fe84f65..8564c01bd 100644 --- a/tests/Oryx.Integration.Tests/VSCodeDebugProtocol/SimpleDAPClient.cs +++ b/tests/Oryx.Integration.Tests/VSCodeDebugProtocol/SimpleDAPClient.cs @@ -39,7 +39,7 @@ namespace Microsoft.Oryx.Integration.Tests.VSCodeDebugProtocol _tcpStream = _tcpClient.GetStream(); } - public async Task Initialize() + public async Task InitializeAsync() { var reqArgs = new Messages.InitializeRequestArguments { ClientName = _name }; var req = new Messages.InitializeRequest { SequenceNumber = _sequence++, Args = reqArgs }; @@ -52,7 +52,7 @@ namespace Microsoft.Oryx.Integration.Tests.VSCodeDebugProtocol // Write out the request await _tcpStream.WriteAsync(reqData, 0, reqData.Length); - return await RecvRawMessage(); + return await RecvRawMessageAsync(); } /// @@ -60,7 +60,7 @@ namespace Microsoft.Oryx.Integration.Tests.VSCodeDebugProtocol /// For example - ignores the Content-Length headers completely. /// /// Array of message bodies received. - private async Task RecvRawMessage() + private async Task RecvRawMessageAsync() { var rawResData = new byte[256]; int bytesRecvd = await _tcpStream.ReadAsync(rawResData, 0, rawResData.Length); diff --git a/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageCanRunWhenAppInsightsModuleNotFound.cs b/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageCanRunWhenAppInsightsModuleNotFound.cs index 814436e94..a0ebf9426 100644 --- a/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageCanRunWhenAppInsightsModuleNotFound.cs +++ b/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageCanRunWhenAppInsightsModuleNotFound.cs @@ -25,7 +25,7 @@ namespace Microsoft.Oryx.RuntimeImage.Tests [MemberData( nameof(TestValueGenerator.GetNodeVersions), MemberType = typeof(TestValueGenerator))] - public async Task GeneratesScript_CanRun_AppInsightsModule_NotFound(string nodeVersion) + public async Task GeneratesScript_CanRun_AppInsightsModule_NotFoundAsync(string nodeVersion) { // This test is for the following scenario: // When we find no application insight dependency in package.json, but env variables for @@ -74,7 +74,7 @@ namespace Microsoft.Oryx.RuntimeImage.Tests [MemberData( nameof(TestValueGenerator.GetNodeVersions), MemberType = typeof(TestValueGenerator))] - public async Task GeneratesScript_CanRun_With_AppInsights_Env_Variables_NotConfigured(string nodeVersion) + public async Task GeneratesScript_CanRun_With_AppInsights_Env_Variables_NotConfigured_Async(string nodeVersion) { // This test is for the following scenario: // When we find no application insight dependency in package.json and env variables for @@ -121,7 +121,7 @@ namespace Microsoft.Oryx.RuntimeImage.Tests [MemberData( nameof(TestValueGenerator.GetNodeVersions), MemberType = typeof(TestValueGenerator))] - public async Task GeneratesScript_CanRun_With_New_AppInsights_Env_Variable_Set(string nodeVersion) + public async Task GeneratesScript_CanRun_With_New_AppInsights_Env_Variable_Set_Async(string nodeVersion) { // This test is for the following scenario: // When we find the user has set env variable "APPLICATIONINSIGHTS_CONNECTION_STRING" application insight dependency in package.json and env variables for @@ -171,7 +171,7 @@ namespace Microsoft.Oryx.RuntimeImage.Tests [Theory] [InlineData("14", "")] [InlineData("14", "disabled")] - public async Task GeneratesScript_Doesnot_Add_Oryx_AppInsights_Logic_With_IPA_Configuration( + public async Task GeneratesScript_Doesnot_Add_Oryx_AppInsights_Logic_With_IPA_Configuration_Async( string nodeVersion, string agentExtensionVersionEnvValue) { diff --git a/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageOtherTests.cs b/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageOtherTests.cs index 281eb124e..f72da6f04 100644 --- a/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageOtherTests.cs +++ b/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageOtherTests.cs @@ -106,7 +106,7 @@ namespace Microsoft.Oryx.RuntimeImage.Tests [MemberData( nameof(TestValueGenerator.GetNodeVersions_SupportDebugging), MemberType = typeof(TestValueGenerator))] - public async Task RunNodeAppUsingProcessJson_withDebugging(string nodeVersion) + public async Task RunNodeAppUsingProcessJson_withDebuggingAsync(string nodeVersion) { var appName = "express-process-json"; var hostDir = Path.Combine(_hostSamplesDir, "nodejs", appName); diff --git a/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageRunAppUsingConfigJs.cs b/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageRunAppUsingConfigJs.cs index d1a0acae1..44c3a5f52 100644 --- a/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageRunAppUsingConfigJs.cs +++ b/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageRunAppUsingConfigJs.cs @@ -23,7 +23,7 @@ namespace Microsoft.Oryx.RuntimeImage.Tests [Theory] [MemberData(nameof(TestValueGenerator.GetNodeVersions_SupportPm2), MemberType = typeof(TestValueGenerator))] - public async Task RunNodeAppUsingConfigJs(string nodeVersion) + public async Task RunNodeAppUsingConfigJsAsync(string nodeVersion) { var appName = "express-config-js"; diff --git a/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageRunAppUsingConfigYml.cs b/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageRunAppUsingConfigYml.cs index 0bd391209..6b935512f 100644 --- a/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageRunAppUsingConfigYml.cs +++ b/tests/Oryx.RuntimeImage.Tests/Node/NodeRuntimeImageRunAppUsingConfigYml.cs @@ -23,7 +23,7 @@ namespace Microsoft.Oryx.RuntimeImage.Tests [Theory] [MemberData(nameof(TestValueGenerator.GetNodeVersions_SupportPm2), MemberType = typeof(TestValueGenerator))] - public async Task RunNodeAppUsingConfigYml(string nodeVersion) + public async Task RunNodeAppUsingConfigYmlAsync(string nodeVersion) { var appName = "express-config-yaml"; diff --git a/tests/Oryx.RuntimeImage.Tests/Php/PhpImageTest.cs b/tests/Oryx.RuntimeImage.Tests/Php/PhpImageTest.cs index 7180cbc04..cc88a1414 100644 --- a/tests/Oryx.RuntimeImage.Tests/Php/PhpImageTest.cs +++ b/tests/Oryx.RuntimeImage.Tests/Php/PhpImageTest.cs @@ -86,7 +86,7 @@ namespace Microsoft.Oryx.RuntimeImage.Tests [Theory] [InlineData("7.4")] - public async Task Check_If_Apache_Allows_Casing_In_PHP_File_Extension(string imageTag) + public async Task Check_If_Apache_Allows_Casing_In_PHP_File_ExtensionAsync(string imageTag) { // Arrange var appName = "imagick-example"; diff --git a/tests/Oryx.Tests.Common/EndToEndTestHelper.cs b/tests/Oryx.Tests.Common/EndToEndTestHelper.cs index f6b1f1c8d..cec25088e 100644 --- a/tests/Oryx.Tests.Common/EndToEndTestHelper.cs +++ b/tests/Oryx.Tests.Common/EndToEndTestHelper.cs @@ -327,13 +327,15 @@ namespace Microsoft.Oryx.Tests.Common var hostPort = Convert.ToInt32(portMapping[1]); return hostPort; } - else if (getPortMappingResult.StdErr.Contains("No such container")) + else if (getPortMappingResult.StdErr.Contains("No such container") || (getPortMappingResult.HasExited && getPortMappingResult.ExitCode != 0)) { - break; + throw new InvalidOperationException($"Could not retreive the host port of the container {containerName}:{portInContainer}. " + + $"{getPortMappingResult.StdErr}"); } } - throw new InvalidOperationException($"Could not retreive the host port of the container {containerName}:{portInContainer}"); + throw new InvalidOperationException($"Could not retreive the host port of the container {containerName}:{portInContainer}. " + + $"Timed out while attempting to retrieve the port."); } private static async Task RunAssertsAsync(Func action, DockerResultBase res, ITestOutputHelper output) diff --git a/tests/SampleApps/DotNetCore/FSharpNetCoreApp21.WebApp/FSharpNetCoreApp21.WebApp.fsproj b/tests/SampleApps/DotNetCore/FSharpNetCoreApp30.WebApp/FSharpNetCoreApp30.WebApp.fsproj similarity index 84% rename from tests/SampleApps/DotNetCore/FSharpNetCoreApp21.WebApp/FSharpNetCoreApp21.WebApp.fsproj rename to tests/SampleApps/DotNetCore/FSharpNetCoreApp30.WebApp/FSharpNetCoreApp30.WebApp.fsproj index e0cb238b5..5933740f8 100644 --- a/tests/SampleApps/DotNetCore/FSharpNetCoreApp21.WebApp/FSharpNetCoreApp21.WebApp.fsproj +++ b/tests/SampleApps/DotNetCore/FSharpNetCoreApp30.WebApp/FSharpNetCoreApp30.WebApp.fsproj @@ -1,7 +1,7 @@ - netcoreapp2.1 + netcoreapp3.0 diff --git a/tests/SampleApps/DotNetCore/FSharpNetCoreApp21.WebApp/Program.fs b/tests/SampleApps/DotNetCore/FSharpNetCoreApp30.WebApp/Program.fs similarity index 93% rename from tests/SampleApps/DotNetCore/FSharpNetCoreApp21.WebApp/Program.fs rename to tests/SampleApps/DotNetCore/FSharpNetCoreApp30.WebApp/Program.fs index 31a7127aa..1ab52fed8 100644 --- a/tests/SampleApps/DotNetCore/FSharpNetCoreApp21.WebApp/Program.fs +++ b/tests/SampleApps/DotNetCore/FSharpNetCoreApp30.WebApp/Program.fs @@ -1,4 +1,4 @@ -namespace FSharpNetCoreApp21.WebApp +namespace FSharpNetCoreApp30.WebApp open System open System.Collections.Generic diff --git a/tests/SampleApps/DotNetCore/FSharpNetCoreApp21.WebApp/Startup.fs b/tests/SampleApps/DotNetCore/FSharpNetCoreApp30.WebApp/Startup.fs similarity index 93% rename from tests/SampleApps/DotNetCore/FSharpNetCoreApp21.WebApp/Startup.fs rename to tests/SampleApps/DotNetCore/FSharpNetCoreApp30.WebApp/Startup.fs index a9e8db78f..0ebd88b12 100644 --- a/tests/SampleApps/DotNetCore/FSharpNetCoreApp21.WebApp/Startup.fs +++ b/tests/SampleApps/DotNetCore/FSharpNetCoreApp30.WebApp/Startup.fs @@ -1,4 +1,4 @@ -namespace FSharpNetCoreApp21.WebApp +namespace FSharpNetCoreApp30.WebApp open System open Microsoft.AspNetCore.Builder diff --git a/tests/SampleApps/php/wordpress-example/configure_wordpress.sh b/tests/SampleApps/php/wordpress-example/configure_wordpress.sh index 8765a90c0..d4c580bbf 100644 --- a/tests/SampleApps/php/wordpress-example/configure_wordpress.sh +++ b/tests/SampleApps/php/wordpress-example/configure_wordpress.sh @@ -23,8 +23,16 @@ define( 'WP_DEBUG', false ); define( 'DISALLOW_FILE_EDIT', true ); PHP +# As of mariadb 10.5, which bullseye is using, the service name is now mariadb +# instead of mysql, but the mysql command is still symlinked. +# See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-105/#binaries-named-mariadb-mysql-symlinked +# # restart mysql server and install WordPress -service mysql start +if service --status-all | grep -Fq 'mysql'; then + service mysql start +else + service mariadb start +fi echo "Installing WordPress......." wp core install --url="http://127.0.0.1" --title="$sitename" --admin_user="$wpuser" --admin_password="$password" --admin_email="user@example.org" --allow-root diff --git a/tests/SampleApps/php/wordpress-example/create_wordpress_db.sh b/tests/SampleApps/php/wordpress-example/create_wordpress_db.sh index e2cde7e79..00e6b6408 100644 --- a/tests/SampleApps/php/wordpress-example/create_wordpress_db.sh +++ b/tests/SampleApps/php/wordpress-example/create_wordpress_db.sh @@ -3,7 +3,15 @@ set -ex apt-get update && apt-get install mariadb-server --yes -service mysql start + +# As of mariadb 10.5, which bullseye is using, the service name is now mariadb +# instead of mysql, but the mysql command is still symlinked. +# See: https://mariadb.com/kb/en/changes-improvements-in-mariadb-105/#binaries-named-mariadb-mysql-symlinked +if service --status-all | grep -Fq 'mysql'; then + service mysql start +else + service mariadb start +fi PASSWDDB="Wordpress@123" MAINDB="wordpressdb"