зеркало из https://github.com/microsoft/Oryx.git
Split integration tests by platform version and build image (#1592)
* Split integration tests by platform version and build image * Reduce number of runners required for integration tests * Remove unused parameter from integration test templates * Fix failing tests * Fix other failing CLI buster test
This commit is contained in:
Родитель
dae4cf03be
Коммит
3f416b1ee1
|
@ -14,86 +14,124 @@ source $REPO_DIR/build/__functions.sh
|
|||
|
||||
buildImageDebianFlavor="$1"
|
||||
|
||||
buildImageTagFilter=""
|
||||
|
||||
if [ -n "$TESTINTEGRATIONCASEFILTER" ];then
|
||||
IFS='&'
|
||||
read -a splitArr <<< "$TESTINTEGRATIONCASEFILTER"
|
||||
for val in "${splitArr[@]}";
|
||||
do
|
||||
if [[ "$val" == "build-image="* ]];then
|
||||
buildImagePrefix="build-image="
|
||||
strippedVal=${val#"$buildImagePrefix"}
|
||||
buildImageTagFilter="$strippedVal"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "$buildImageTagFilter" ];then
|
||||
echo
|
||||
echo "Filtering test build images by provided build image tag filter '$buildImageTagFilter'"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Building build images for tests..."
|
||||
|
||||
echo "Building stretch based github action image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:github-actions-debian-stretch" \
|
||||
--build-arg PARENT_IMAGE_BASE=github-actions-debian-stretch \
|
||||
-f "$ORYXTESTS_GITHUB_ACTIONS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
# Build GitHub Actions stretch build image
|
||||
if [ -z "$buildImageTagFilter" ] || [ "$buildImageTagFilter" == "github-actions-debian-stretch" ];then
|
||||
echo "Building stretch based GitHub Action image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:github-actions-debian-stretch" \
|
||||
--build-arg PARENT_IMAGE_BASE=github-actions-debian-stretch \
|
||||
-f "$ORYXTESTS_GITHUB_ACTIONS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "Building buster based github action image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:github-actions-debian-buster" \
|
||||
--build-arg PARENT_IMAGE_BASE=github-actions-debian-buster \
|
||||
-f "$ORYXTESTS_GITHUB_ACTIONS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
# Build GitHub Actions buster build image
|
||||
if [ -z "$buildImageTagFilter" ] || [ "$buildImageTagFilter" == "github-actions-debian-buster" ];then
|
||||
echo "Building buster based GitHub Action image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:github-actions-debian-buster" \
|
||||
--build-arg PARENT_IMAGE_BASE=github-actions-debian-buster \
|
||||
-f "$ORYXTESTS_GITHUB_ACTIONS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "Building bullseye based github action image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:github-actions-debian-bullseye" \
|
||||
--build-arg PARENT_IMAGE_BASE=github-actions-debian-bullseye \
|
||||
-f "$ORYXTESTS_GITHUB_ACTIONS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
# Build GitHub Actions bullseye build image and helper build images
|
||||
if [ -z "$buildImageTagFilter" ] || [ "$buildImageTagFilter" == "github-actions-debian-bullseye" ];then
|
||||
echo "Building bullseye based GitHub Action image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:github-actions-debian-bullseye" \
|
||||
--build-arg PARENT_IMAGE_BASE=github-actions-debian-bullseye \
|
||||
-f "$ORYXTESTS_GITHUB_ACTIONS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
|
||||
echo "Building stretch based full build image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:debian-stretch" \
|
||||
-f "$ORYXTESTS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
echo "Building image that uses bullseye based GitHub Action as a base but doesn't have all required environment variables..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:github-actions-debian-bullseye-base" \
|
||||
--build-arg PARENT_IMAGE_BASE=github-actions-debian-bullseye \
|
||||
-f "$ORYXTESTS_GITHUB_ACTIONS_ASBASE_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
|
||||
echo "Building stretch based lts-version image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:lts-versions-debian-stretch" \
|
||||
--build-arg PARENT_IMAGE_BASE=lts-versions-debian-stretch \
|
||||
-f "$ORYXTESTS_LTS_VERSIONS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
echo "Building image that uses bullseye based GitHub Action as a base and has all required environment variables..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:github-actions-debian-bullseye-base-withenv" \
|
||||
--build-arg PARENT_IMAGE_BASE=github-actions-debian-bullseye \
|
||||
--build-arg DEBIAN_FLAVOR=bullseye \
|
||||
-f "$ORYXTESTS_GITHUB_ACTIONS_ASBASE_WITHENV_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "Building buster based lst version image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:lts-versions-debian-buster" \
|
||||
--build-arg PARENT_IMAGE_BASE=lts-versions-debian-buster \
|
||||
-f "$ORYXTESTS_LTS_VERSIONS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
# Build latest stretch build image
|
||||
if [ -z "$buildImageTagFilter" ] || [ "$buildImageTagFilter" == "debian-stretch" ];then
|
||||
echo "Building stretch based full build image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:debian-stretch" \
|
||||
-f "$ORYXTESTS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "Building image that uses bullseye based github action as a base but doesn't have all required environment variables..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:github-actions-debian-bullseye-base" \
|
||||
--build-arg PARENT_IMAGE_BASE=github-actions-debian-bullseye \
|
||||
-f "$ORYXTESTS_GITHUB_ACTIONS_ASBASE_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
# Build LTS versions stretch build image
|
||||
if [ -z "$buildImageTagFilter" ] || [ "$buildImageTagFilter" == "lts-versions-debian-stretch" ];then
|
||||
echo "Building stretch based LTS versions image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:lts-versions-debian-stretch" \
|
||||
--build-arg PARENT_IMAGE_BASE=lts-versions-debian-stretch \
|
||||
-f "$ORYXTESTS_LTS_VERSIONS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "Building image that uses bullseye based github action as a base and has all required environment variables..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:github-actions-debian-bullseye-base-withenv" \
|
||||
--build-arg PARENT_IMAGE_BASE=github-actions-debian-bullseye \
|
||||
--build-arg DEBIAN_FLAVOR=bullseye \
|
||||
-f "$ORYXTESTS_GITHUB_ACTIONS_ASBASE_WITHENV_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
# Build LTS versions buster build image
|
||||
if [ -z "$buildImageTagFilter" ] || [ "$buildImageTagFilter" == "lts-versions-debian-buster" ];then
|
||||
echo "Building buster based LTS versions image for tests..."
|
||||
docker build \
|
||||
-t "$ORYXTESTS_BUILDIMAGE_REPO:lts-versions-debian-buster" \
|
||||
--build-arg PARENT_IMAGE_BASE=lts-versions-debian-buster \
|
||||
-f "$ORYXTESTS_LTS_VERSIONS_BUILDIMAGE_DOCKERFILE" \
|
||||
.
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
fi
|
||||
|
||||
dockerCleanupIfRequested
|
||||
|
|
|
@ -62,6 +62,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Theory, Trait("category", "githubactions")]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
[MemberData(nameof(ImageNameData))]
|
||||
public void GeneratesScript_AndBuildNodeAppsWithDynamicInstallationGithubActions(string version, string buildImageName)
|
||||
{
|
||||
|
@ -69,6 +70,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Theory, Trait("category", "cli")]
|
||||
[Trait("build-image", "cli-debian-stretch")]
|
||||
[MemberData(nameof(ImageNameDataCli))]
|
||||
public void GeneratesScript_AndBuildNodeAppsWithDynamicInstallationCli(string version, string buildImageName)
|
||||
{
|
||||
|
@ -76,6 +78,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Theory, Trait("category", "cli-buster")]
|
||||
[Trait("build-image", "cli-debian-buster")]
|
||||
[MemberData(nameof(ImageNameDataCliBuster))]
|
||||
public void GeneratesScript_AndBuildNodeAppsWithDynamicInstallationCliBuster(string version, string buildImageName)
|
||||
{
|
||||
|
@ -117,6 +120,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Theory, Trait("category", "githubactions")]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
[InlineData("14.19.1", "14.19.1")]
|
||||
[InlineData("16", NodeVersions.Node16Version)]
|
||||
public void GeneratesScript_AndBuildNodeAppsWithDynamicInstallation_DefaultEnvVar(string defaultVersion, string expectedVersion)
|
||||
|
@ -153,6 +157,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Fact, Trait("category", "ltsversions")]
|
||||
[Trait("build-image", "lts-versions-debian-stretch")]
|
||||
public void DynamicallyInstallsNodeRuntimeAndBuilds()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -190,6 +195,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Fact, Trait("category", "githubactions")]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public void DynamicInstall_ReInstallsSdk_IfSentinelFileIsNotPresent()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -234,6 +240,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Fact, Trait("category", "latest")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public void BuildsApplication_ByDynamicallyInstalling_IntoCustomDynamicInstallationDir()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -272,6 +279,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Fact, Trait("category", "githubactions")]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public void BuildNodeApp_AfterInstallingStretchSpecificSdk()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -308,10 +316,21 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
result.GetDebugInfo());
|
||||
}
|
||||
|
||||
[Theory, Trait("category", "githubactions")]
|
||||
[InlineData(ImageTestHelperConstants.GitHubActionsBuster)]
|
||||
[InlineData(ImageTestHelperConstants.GitHubActionsBullseye)]
|
||||
public void NodeFails_ToInstallStretchSdk_OnNonStretchImage(string imageTag)
|
||||
[Fact, Trait("category", "githubactions")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public void NodeFails_ToInstallStretchSdk_OnBusterImage()
|
||||
{
|
||||
Run_NodeFails_ToInstallStretchSdk_OnNonStretchImage(ImageTestHelperConstants.GitHubActionsBuster);
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "githubactions")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public void NodeFails_ToInstallStretchSdk_OnBullseyeImage()
|
||||
{
|
||||
Run_NodeFails_ToInstallStretchSdk_OnNonStretchImage(ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
private void Run_NodeFails_ToInstallStretchSdk_OnNonStretchImage(string imageTag)
|
||||
{
|
||||
// Arrange
|
||||
var version = "9.4.0"; // version only exists for stretch images
|
||||
|
@ -349,6 +368,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Theory, Trait("category", "githubactions")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
[InlineData("18.0.0", ImageTestHelperConstants.GitHubActionsBullseye)]
|
||||
public void GeneratesScript_AndBuildNodeAppsWithDynamicInstallationOnBullseyeImage(string version, string buildImageName)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
// --------------------------------------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using Microsoft.Oryx.Tests.Common;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Microsoft.Oryx.BuildImage.Tests
|
||||
{
|
||||
public class PulledBuildImageTypeTest
|
||||
{
|
||||
private readonly DockerCli _dockerCli;
|
||||
private readonly ITestOutputHelper _output;
|
||||
private readonly ImageTestHelper _imageHelper;
|
||||
|
||||
public PulledBuildImageTypeTest(ITestOutputHelper output)
|
||||
{
|
||||
_output = output;
|
||||
_dockerCli = new DockerCli();
|
||||
_imageHelper = new ImageTestHelper(output);
|
||||
}
|
||||
|
||||
private void RunAsserts(Action action, string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
action();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_output.WriteLine(message);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "latest")]
|
||||
public void PulledLatestStretchBuildImages_Contains_BUILDIMAGE_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.LatestStretchTag), "full");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "ltsversions")]
|
||||
public void PulledLtsVersionsStretchBuildImages_Contains_BUILDIMAGE_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.LtsVersionsStretch), "ltsversions");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "githubactions")]
|
||||
public void PulledGitHubActionsStretchBuildImages_Contains_BUILDIMAGE_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.GitHubActionsStretch), "githubactions");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "cli")]
|
||||
public void PulledCliStretchBuildImages_Contains_BUILDIMAGE_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(_imageHelper.GetCliImage(ImageTestHelperConstants.CliRepository), "cli");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "cli-buster")]
|
||||
public void PulledCliBusterBuildImages_Contains_BUILDIMAGE_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), "cli");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "jamstack")]
|
||||
public void PulledJamstackStretchBuildImages_Contains_BUILDIMAGE_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.AzureFunctionsJamStackStretch), "jamstack");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "vso-focal")]
|
||||
public void PulledVsoFocalBuildImages_Contains_BUILDIMAGE_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.VsoFocal), "vso-focal");
|
||||
}
|
||||
|
||||
private void PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(string buildImageName, string expectedBuildImageType)
|
||||
{
|
||||
// Arrange and Act
|
||||
var result = _dockerCli.Run(new DockerRunArguments
|
||||
{
|
||||
ImageId = buildImageName,
|
||||
CommandToExecuteOnRun = "/bin/bash",
|
||||
CommandArguments = new[] { "-c", "cat /opt/oryx/.imagetype" }
|
||||
});
|
||||
|
||||
// Assert
|
||||
var actualOutput = result.StdOut.ReplaceNewLine();
|
||||
RunAsserts(
|
||||
() =>
|
||||
{
|
||||
Assert.True(result.IsSuccess);
|
||||
Assert.Contains(expectedBuildImageType, actualOutput);
|
||||
},
|
||||
result.GetDebugInfo());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
// --------------------------------------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Oryx.Tests.Common;
|
||||
using System;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Microsoft.Oryx.BuildImage.Tests
|
||||
{
|
||||
public class PulledBuildOsTypeTest
|
||||
{
|
||||
private readonly DockerCli _dockerCli;
|
||||
private readonly ITestOutputHelper _output;
|
||||
private readonly ImageTestHelper _imageHelper;
|
||||
|
||||
public PulledBuildOsTypeTest(ITestOutputHelper output)
|
||||
{
|
||||
_output = output;
|
||||
_dockerCli = new DockerCli();
|
||||
_imageHelper = new ImageTestHelper(output);
|
||||
}
|
||||
|
||||
private void RunAsserts(Action action, string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
action();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_output.WriteLine(message);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "latest")]
|
||||
public void PulledLatestStretchBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.LatestStretchTag), "DEBIAN|STRETCH");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "ltsversions")]
|
||||
public void PulledLtsVersionsStretchBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.LtsVersionsStretch), "DEBIAN|STRETCH");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "ltsversions")]
|
||||
public void PulledLtsVersionsBusterBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.LtsVersionsBuster), "DEBIAN|BUSTER");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "githubactions")]
|
||||
public void PulledGitHubActionsStretchBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.GitHubActionsStretch), "DEBIAN|STRETCH");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "githubactions")]
|
||||
public void PulledGitHubActionsBusterBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.GitHubActionsBuster), "DEBIAN|BUSTER");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "githubactions")]
|
||||
public void PulledGitHubActionsBullseyeBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.GitHubActionsBullseye), "DEBIAN|BULLSEYE");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "cli")]
|
||||
public void PulledCliStretchBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetCliImage(ImageTestHelperConstants.CliRepository), "DEBIAN|STRETCH");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "cli-buster")]
|
||||
public void PulledCliBusterBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), "DEBIAN|BUSTER");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "jamstack")]
|
||||
public void PulledJamstackStretchBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.AzureFunctionsJamStackStretch), "DEBIAN|STRETCH");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "jamstack")]
|
||||
public void PulledJamstackBusterBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.AzureFunctionsJamStackBuster), "DEBIAN|BUSTER");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "jamstack")]
|
||||
public void PulledJamstackBullseyeBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.AzureFunctionsJamStackBullseye), "DEBIAN|BULLSEYE");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "vso-focal")]
|
||||
public void PulledVsoFocalBuildImages_Contains_BUILDOS_TYPE_Info()
|
||||
{
|
||||
PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetBuildImage(ImageTestHelperConstants.VsoFocal), "DEBIAN|FOCAL-SCM");
|
||||
}
|
||||
|
||||
private void PulledBuildImages_Contains_BUILDOS_TYPE_Info(string buildImageName, string expectedBuildOsType)
|
||||
{
|
||||
// Arrange and Act
|
||||
var result = _dockerCli.Run(new DockerRunArguments
|
||||
{
|
||||
ImageId = buildImageName,
|
||||
CommandToExecuteOnRun = "/bin/bash",
|
||||
CommandArguments = new[] { "-c", "cat /opt/oryx/.ostype" }
|
||||
});
|
||||
|
||||
// Assert
|
||||
var actualOutput = result.StdOut.ReplaceNewLine();
|
||||
RunAsserts(
|
||||
() =>
|
||||
{
|
||||
Assert.True(result.IsSuccess);
|
||||
Assert.Equal(expectedBuildOsType, actualOutput);
|
||||
},
|
||||
result.GetDebugInfo());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
// --------------------------------------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using Microsoft.Oryx.Tests.Common;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "db")]
|
||||
public class PulledBuildImageTypeTest
|
||||
{
|
||||
private readonly DockerCli _dockerCli;
|
||||
private readonly ITestOutputHelper _output;
|
||||
|
||||
public PulledBuildImageTypeTest(ITestOutputHelper output)
|
||||
{
|
||||
_output = output;
|
||||
_dockerCli = new DockerCli();
|
||||
}
|
||||
|
||||
private void RunAsserts(Action action, string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
action();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_output.WriteLine(message);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(Settings.WithRootAccessBuildImageName, "full")]
|
||||
[InlineData(Settings.WithRootAccessLtsVersionsBuildImageName, "ltsversions")]
|
||||
[InlineData(Settings.GitHubActionsBuildImageName, "githubactions")]
|
||||
[InlineData(Settings.CliBuildImageName, "cli")]
|
||||
[InlineData(Settings.CliBusterBuildImageName, "cli")]
|
||||
[InlineData(Settings.JamStackBuildImageName, "jamstack")]
|
||||
[InlineData(Settings.VsoUbuntuBuildImageName, "vso-focal")]
|
||||
public void PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(string buildImageName, string expectedBuildImageType)
|
||||
{
|
||||
// Arrange and Act
|
||||
var result = _dockerCli.Run(new DockerRunArguments
|
||||
{
|
||||
ImageId = buildImageName,
|
||||
CommandToExecuteOnRun = "/bin/bash",
|
||||
CommandArguments = new[] { "-c", "cat /opt/oryx/.imagetype" }
|
||||
});
|
||||
|
||||
// Assert
|
||||
var actualOutput = result.StdOut.ReplaceNewLine();
|
||||
RunAsserts(
|
||||
() =>
|
||||
{
|
||||
Assert.True(result.IsSuccess);
|
||||
Assert.Contains(expectedBuildImageType, actualOutput);
|
||||
},
|
||||
result.GetDebugInfo());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
// --------------------------------------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Oryx.Tests.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "db")]
|
||||
public class PulledBuildOsTypeTest
|
||||
{
|
||||
private readonly DockerCli _dockerCli;
|
||||
private readonly ITestOutputHelper _output;
|
||||
|
||||
public PulledBuildOsTypeTest(ITestOutputHelper output)
|
||||
{
|
||||
_output = output;
|
||||
_dockerCli = new DockerCli();
|
||||
}
|
||||
|
||||
private void RunAsserts(Action action, string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
action();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_output.WriteLine(message);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(Settings.WithRootAccessBuildImageName, "DEBIAN|STRETCH")]
|
||||
[InlineData(Settings.WithRootAccessLtsVersionsBuildImageName, "DEBIAN|STRETCH")]
|
||||
[InlineData(Settings.LtsVerionsBusterBuildImageName, "DEBIAN|BUSTER")]
|
||||
[InlineData(Settings.GitHubActionsBuildImageName, "DEBIAN|STRETCH")]
|
||||
[InlineData(Settings.GitHubActionsBusterBuildImageName, "DEBIAN|BUSTER")]
|
||||
[InlineData(Settings.GitHubActionsBullseyeBuildImageName, "DEBIAN|BULLSEYE")]
|
||||
[InlineData(Settings.CliBuildImageName, "DEBIAN|STRETCH")]
|
||||
[InlineData(Settings.CliBusterBuildImageName, "DEBIAN|BUSTER")]
|
||||
[InlineData(Settings.JamStackBuildImageName, "DEBIAN|STRETCH")]
|
||||
[InlineData(Settings.JamStackBullseyeBuildImageName, "DEBIAN|BULLSEYE")]
|
||||
[InlineData(Settings.JamStackBusterBuildImageName, "DEBIAN|BUSTER")]
|
||||
[InlineData(Settings.VsoUbuntuBuildImageName, "DEBIAN|FOCAL-SCM")]
|
||||
public void PulledBuildImages_Contains_BUILDOS_TYPE_Info(string buildImageName, string expectedBuildOsType)
|
||||
{
|
||||
// Arrange and Act
|
||||
var result = _dockerCli.Run(new DockerRunArguments
|
||||
{
|
||||
ImageId = buildImageName,
|
||||
CommandToExecuteOnRun = "/bin/bash",
|
||||
CommandArguments = new[] { "-c", "cat /opt/oryx/.ostype" }
|
||||
});
|
||||
|
||||
// Assert
|
||||
var actualOutput = result.StdOut.ReplaceNewLine();
|
||||
RunAsserts(
|
||||
() =>
|
||||
{
|
||||
Assert.True(result.IsSuccess);
|
||||
Assert.Equal(expectedBuildOsType, actualOutput);
|
||||
},
|
||||
result.GetDebugInfo());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,6 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
[InlineData("3.1", NetCoreApp31MvcApp, "Welcome to ASP.NET Core MVC!")]
|
||||
public async Task CanBuildAndRun_NetCore31WebAppAsync(
|
||||
string runtimeVersion,
|
||||
|
@ -74,6 +75,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
[InlineData("3.1", NetCoreApp31MvcApp, "Welcome to ASP.NET Core MVC!")]
|
||||
[InlineData("5.0", Net5MvcApp, "Welcome to ASP.NET Core MVC!")]
|
||||
public async Task CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(
|
||||
|
|
|
@ -13,7 +13,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "dotnetcore-31")]
|
||||
[Trait("category", "dotnetcore-3.1")]
|
||||
public class DotNetCorePreRunCommandOrScriptTest : DotNetCoreEndToEndTestsBase
|
||||
{
|
||||
private readonly string RunScriptPath = DefaultStartupFilePath;
|
||||
|
@ -26,6 +26,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore31MvcApp_UsingPreRunCommand_WithDynamicInstallAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -93,6 +94,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore31MvcApp_UsingPreRunScript_WithDynamicInstallAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -14,7 +14,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "dotnetcore-30")]
|
||||
[Trait("category", "dotnetcore-3.0")]
|
||||
public class DotNetCoreRuntimeVersion30Tests : DotNetCoreEndToEndTestsBase
|
||||
{
|
||||
public DotNetCoreRuntimeVersion30Tests(ITestOutputHelper output, TestTempDirTestFixture testTempDirTestFixture)
|
||||
|
@ -23,6 +23,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore30WebAppAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -68,6 +69,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore30MvcAppAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -113,6 +115,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanRun_NetCore30App_PublishedOnMacMachine_ButRunOnNetCore30RuntimeContainerAsync()
|
||||
{
|
||||
// This test verifies that we fallback to using 'dotnet TodoAppFromMac.dll' since the executable
|
||||
|
@ -149,6 +152,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore30WebApp_UsingExplicitStartupCommandAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -197,6 +201,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore30WebApp_HavingExplicitAssemblyNameAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -14,7 +14,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "dotnetcore-31")]
|
||||
[Trait("category", "dotnetcore-3.1")]
|
||||
public class DotNetCoreRuntimeVersion31Tests : DotNetCoreEndToEndTestsBase
|
||||
{
|
||||
public DotNetCoreRuntimeVersion31Tests(ITestOutputHelper output, TestTempDirTestFixture testTempDirTestFixture)
|
||||
|
@ -23,6 +23,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore31WebAppAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -68,6 +69,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunApp_FromNestedOutputDirectoryAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -115,6 +117,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanRunAppWhichUsesGDILibraryAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -162,6 +165,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFileAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -14,7 +14,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "dotnetcore-50")]
|
||||
[Trait("category", "dotnetcore-5.0")]
|
||||
public class DotNetCoreRuntimeVersion50Tests : DotNetCoreEndToEndTestsBase
|
||||
{
|
||||
public DotNetCoreRuntimeVersion50Tests(ITestOutputHelper output, TestTempDirTestFixture testTempDirTestFixture)
|
||||
|
@ -23,6 +23,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public async Task CanBuildAndRun_Without_Oryx_AppInsights_Codeless_ConfigurationAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -80,6 +81,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore50MvcAppAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -16,7 +16,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "dotnetcore-60")]
|
||||
[Trait("category", "dotnetcore-6.0")]
|
||||
public class DotNetCoreRuntimeVersion60Tests : DotNetCoreEndToEndTestsBase
|
||||
{
|
||||
public DotNetCoreRuntimeVersion60Tests(ITestOutputHelper output, TestTempDirTestFixture testTempDirTestFixture)
|
||||
|
@ -25,6 +25,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore60MvcAppAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -73,6 +74,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore60MvcApp_WithCustomizedRunCommand()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -138,6 +140,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public async Task CanBuildAndRun_Adds_Oryx_AppInsights_Codeless_ConfigurationAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -196,6 +199,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public async Task CanBuildAndRun_DoesNot_Add_Oryx_AppInsights_Codeless_ConfigurationAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -254,6 +258,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_NetCore60MvcApp_UsingExplicitStartupCommandAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -303,6 +308,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public async Task CanBuildAndRunApp_FromNestedOutputDirectoryAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -352,6 +358,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-stretch")]
|
||||
public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFileAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -14,7 +14,6 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "golang")]
|
||||
public class GolangBuildRunTests : GolangEndToEndTestsBase
|
||||
{
|
||||
public GolangBuildRunTests(ITestOutputHelper output, TestTempDirTestFixture testTempDirTestFixture)
|
||||
|
@ -22,14 +21,55 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
{
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("1.17", ImageTestHelperConstants.FullBuster)]
|
||||
[InlineData("1.17", ImageTestHelperConstants.FullBullseye)]
|
||||
[InlineData("1.18", ImageTestHelperConstants.FullBuster)]
|
||||
[InlineData("1.18", ImageTestHelperConstants.FullBullseye)]
|
||||
[InlineData("1.19", ImageTestHelperConstants.FullBuster)]
|
||||
[InlineData("1.19", ImageTestHelperConstants.FullBullseye)]
|
||||
public async Task CanRunApp_WithoutBuildManifestFileAsync(string golangVersion, string imageTag)
|
||||
[Fact]
|
||||
[Trait("category", "golang-1.17")]
|
||||
[Trait("build-image", "full-debian-buster")]
|
||||
public async Task RunGolang117BuildRunTestsAsync_WithFullBuster()
|
||||
{
|
||||
await CanRunApp_WithoutBuildManifestFileAsync("1.17", ImageTestHelperConstants.FullBuster);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "golang-1.17")]
|
||||
[Trait("build-image", "full-debian-bullseye")]
|
||||
public async Task RunGolang117BuildRunTestsAsync_WithFullBullseye()
|
||||
{
|
||||
await CanRunApp_WithoutBuildManifestFileAsync("1.17", ImageTestHelperConstants.FullBullseye);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "golang-1.18")]
|
||||
[Trait("build-image", "full-debian-buster")]
|
||||
public async Task RunGolang118BuildRunTestsAsync_WithFullBuster()
|
||||
{
|
||||
await CanRunApp_WithoutBuildManifestFileAsync("1.18", ImageTestHelperConstants.FullBuster);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "golang-1.18")]
|
||||
[Trait("build-image", "full-debian-bullseye")]
|
||||
public async Task RunGolang118BuildRunTestsAsync_WithFullBullseye()
|
||||
{
|
||||
await CanRunApp_WithoutBuildManifestFileAsync("1.18", ImageTestHelperConstants.FullBullseye);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "golang-1.19")]
|
||||
[Trait("build-image", "full-debian-buster")]
|
||||
public async Task RunGolang119BuildRunTestsAsync_WithFullBuster()
|
||||
{
|
||||
await CanRunApp_WithoutBuildManifestFileAsync("1.19", ImageTestHelperConstants.FullBuster);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "golang-1.19")]
|
||||
[Trait("build-image", "full-debian-bullseye")]
|
||||
public async Task RunGolang119BuildRunTestsAsync_WithFullBullseye()
|
||||
{
|
||||
await CanRunApp_WithoutBuildManifestFileAsync("1.19", ImageTestHelperConstants.FullBullseye);
|
||||
}
|
||||
|
||||
private async Task CanRunApp_WithoutBuildManifestFileAsync(string golangVersion, string imageTag)
|
||||
{
|
||||
// Arrange
|
||||
var hostDir = Path.Combine(_hostSamplesDir, "golang", GolangHelloWorldWebApp);
|
||||
|
|
|
@ -24,6 +24,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
|
||||
// Official Node.js version that is supported by Angular CLI 14.0+ is 16.10 or greater
|
||||
[Theory(Skip = "Temporarily skipping Angular 14 tests: Work item 1565890")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("16"), Trait("category", "node-16")]
|
||||
public async Task CanBuildAndRunAngular14_WithDevAndProdDependencies_UsingCompressedNodeModulesAsync(string nodeVersion)
|
||||
{
|
||||
|
@ -71,6 +72,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory(Skip = "Temporarily skipping Angular 14 tests: Work item 1565890")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("16"), Trait("category", "node-16")]
|
||||
public async Task CanBuildAndRun_Angular14App_WithoutCompressedNodeModulesAsync(string nodeVersion)
|
||||
{
|
||||
|
@ -115,6 +117,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory(Skip = "Temporarily skipping Angular 14 tests: Work item 1565890")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("16"), Trait("category", "node-16")]
|
||||
public async Task CanBuildAndRun_Angular14App_NodeModules_SymLink_Exists_InRoot_WithoutCompressionAsync(string nodeVersion)
|
||||
{
|
||||
|
@ -183,6 +186,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory(Skip = "Temporarily skipping Angular 14 tests: Work item 1565890")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("16"), Trait("category", "node-16")]
|
||||
public async Task CanBuildAndRunAngular14_WithDevAndProdDependencies_NodeModules_Dir_Exists_InAppDir_UsingCompressionAsync(string nodeVersion)
|
||||
{
|
||||
|
@ -258,6 +262,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory(Skip = "Temporarily skipping Angular 14 tests: Work item 1565890")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("16"), Trait("category", "node-16")]
|
||||
public async Task CanBuildAndRunAngular14_WithDevAndProdDependencies_NodeModules_SymLink_Exists_InAppDir_UsingCompressionAsync(string nodeVersion)
|
||||
{
|
||||
|
|
|
@ -22,10 +22,23 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
{
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(NodeVersions.Node14Version), Trait("category", "node-14")]
|
||||
[InlineData(NodeVersions.Node16Version), Trait("category", "node-16")]
|
||||
public async Task CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(string nodeVersion)
|
||||
[Fact]
|
||||
[Trait("category", "node-14-gh-buster")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task CanBuildAndRunNode14AppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync()
|
||||
{
|
||||
await CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(NodeVersions.Node14Version);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-16")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task CanBuildAndRunNode16AppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync()
|
||||
{
|
||||
await CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(NodeVersions.Node16Version);
|
||||
}
|
||||
|
||||
private async Task CanBuildAndRunAppUsingDynamicInstallationOfRuntimeInRuntimeImageAsync(string nodeVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "webfrontend";
|
||||
|
@ -50,7 +63,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetLtsVersionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster),
|
||||
"/bin/sh",
|
||||
new[]
|
||||
{
|
||||
|
@ -72,10 +85,23 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(NodeVersions.Node14Version), Trait("category", "node-14")]
|
||||
[InlineData(NodeVersions.Node16Version), Trait("category", "node-16")]
|
||||
public async Task CanBuildAndRunApp_UsingScriptCommandAsync(string nodeVersion)
|
||||
[Fact]
|
||||
[Trait("category", "node-14-gh-buster")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task CanBuildAndRunNode14App_UsingScriptCommandAsync()
|
||||
{
|
||||
await CanBuildAndRunApp_UsingScriptCommandAsync(NodeVersions.Node14Version);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-16")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task CanBuildAndRunNode16App_UsingScriptCommandAsync()
|
||||
{
|
||||
await CanBuildAndRunApp_UsingScriptCommandAsync(NodeVersions.Node16Version);
|
||||
}
|
||||
|
||||
private async Task CanBuildAndRunApp_UsingScriptCommandAsync(string nodeVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "webfrontend";
|
||||
|
@ -101,7 +127,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetLtsVersionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster),
|
||||
"/bin/sh",
|
||||
new[]
|
||||
{
|
||||
|
@ -125,6 +151,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
|
||||
[Theory]
|
||||
[InlineData(NodeVersions.Node18Version), Trait("category", "node-18")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunApp_UsingScriptCommand_WithBullseyeBasedImages(string nodeVersion)
|
||||
{
|
||||
// Arrange
|
||||
|
@ -151,7 +178,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage("github-actions-bullseye"),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBullseye),
|
||||
"/bin/sh",
|
||||
new[]
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "node-14-3")]
|
||||
[Trait("category", "node-14-skipped")]
|
||||
[Trait("db", "mysql")]
|
||||
public class NodeMySqlIntegrationTests : DatabaseTestsBase, IClassFixture<Fixtures.MySqlDbContainerFixture>
|
||||
{
|
||||
|
@ -20,10 +20,21 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
{
|
||||
}
|
||||
|
||||
[Theory(Skip = "bug: 1505700 may be intermittent")]
|
||||
[InlineData(ImageTestHelperConstants.LatestStretchTag)]
|
||||
[InlineData(ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
public async Task NodeApp_MySqlDBAsync(string imageTag)
|
||||
[Fact(Skip = "Bug #1505700 may be intermittent")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Node14App_MySqlDB_WithLatestStretchBuildImageAsync()
|
||||
{
|
||||
await NodeApp_MySqlDBAsync(ImageTestHelperConstants.LatestStretchTag);
|
||||
}
|
||||
|
||||
[Fact(Skip = "Bug #1505700 may be intermittent")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task Node14App_MySqlDB_WithGitHubActionsBusterBuildImageAsync()
|
||||
{
|
||||
await NodeApp_MySqlDBAsync(ImageTestHelperConstants.GitHubActionsBuster);
|
||||
}
|
||||
|
||||
private async Task NodeApp_MySqlDBAsync(string imageTag)
|
||||
{
|
||||
await RunTestAsync(
|
||||
"nodejs",
|
||||
|
|
|
@ -13,7 +13,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "node-14-3")]
|
||||
[Trait("category", "node-14-skipped")]
|
||||
public class NodeNextJsAppTest : NodeEndToEndTestsBase
|
||||
{
|
||||
public const string AppName = "blog-starter-nextjs";
|
||||
|
@ -24,6 +24,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact(Skip = "next blogger app is broken")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_BlogStarterNextJsApp_WithoutZippingNodeModulesAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -68,6 +69,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact(Skip = "next blogger app is broken")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_BlogStarterNextJsApp_UsingZippedNodeModulesAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -13,7 +13,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "node-14-4")]
|
||||
[Trait("category", "node-14-stretch-1")]
|
||||
public class NodeNuxtJsAppTest : NodeEndToEndTestsBase
|
||||
{
|
||||
public const string AppName = "helloworld-nuxtjs";
|
||||
|
@ -25,6 +25,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_HackerNewsNuxtJsApp_WithoutZippingNodeModulesAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -71,6 +72,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_HackerNewsNuxtJsApp_UsingZippedNodeModulesAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -27,7 +27,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-5")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunNodeApp_UsingCustomManifestFileLocationAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -79,7 +80,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-5")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunNodeApp_UsingZippedNodeModules_WithoutExtractingAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -131,6 +133,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory(Skip = "Bug#1071724")]
|
||||
[Trait("category", "node-14-skipped")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("true")]
|
||||
[InlineData("false")]
|
||||
public async Task CopiesNodeModulesInSubDirectory_ToDestinationAre_WithoutCompressedNodeModulesAsync(string pruneDevDependency)
|
||||
|
@ -179,7 +183,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-5")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunNodeApp_OnSecondBuild_AfterZippingNodeModules_InFirstBuildAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -230,7 +235,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-5")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunNodeApp_OnSecondBuild_AfterNotZippingNodeModules_InFirstBuildAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -281,7 +287,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-5")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task NodeStartupScript_UsesPortEnvironmentVariableValueAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -324,9 +331,10 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[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")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("ecosystem.config.js"), Trait("category", "node-14-stretch-4")]
|
||||
[InlineData("ecosystem.config.yaml"), Trait("category", "node-14-stretch-4")]
|
||||
[InlineData("ecosystem.config.yml"), Trait("category", "node-14-stretch-4")]
|
||||
public async Task CanRunNodeApp_WithoutPm2_EvenThoughPm2SpecificFilesArePresentInRepoAsync(string pm2ConfigFileName)
|
||||
{
|
||||
// Arrange
|
||||
|
@ -373,7 +381,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-6")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task NodeStartupScript_UsesSuppliedBindingPort_EvenIfPortEnvironmentVariableValue_IsPresentAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -416,7 +425,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-6")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunNodeApp_UsingYarnForBuild_AndExplicitOutputFileAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -449,7 +459,8 @@ 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")]
|
||||
[EnableOnPlatform("LINUX"), Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildNodeAppUsingScriptsNodeInPackageJsonAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -491,7 +502,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-6")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Node_Lab2AppServiceAppAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -532,8 +544,9 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
[Fact(Skip = "bug: 1505700")]
|
||||
// [Trait("category", "node-14-6")]
|
||||
[Fact(Skip = "bug: 1505700")]
|
||||
[Trait("category", "node-14-skipped")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Node_SoundCloudNgrxAppAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -577,7 +590,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-6")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Node_CreateReactAppSampleAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -619,6 +633,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact(Skip = "get rid of single image, #1088920")]
|
||||
[Trait("category", "node-14-skipped")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Node_CreateReactAppSample_SingleImageAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -657,6 +673,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact(Skip = "get rid of single image, #1088920")]
|
||||
[Trait("category", "node-14-skipped")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_NodeExpressApp_UsingSingleImage_AndCustomScriptAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -701,6 +719,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact(Skip = "get rid of single image, #1088920")]
|
||||
[Trait("category", "node-14-skipped")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_NodeExpressApp_UsingSingleImage_AndCustomStartupCommandOnlyAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -743,7 +763,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-6")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunNodeApp_UsingNestedOutputDirectoryAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -784,7 +805,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-6")]
|
||||
[Trait("category", "node-14-stretch-4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunNodeApp_UsingIntermediateDir_AndNestedOutputDirectoryAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -11,7 +11,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "node-14")]
|
||||
[Trait("category", "node-14-skipped")]
|
||||
[Trait("db", "postgres")]
|
||||
public class NodePostgreSqlIntegrationTests : DatabaseTestsBase, IClassFixture<Fixtures.PostgreSqlDbContainerFixture>
|
||||
{
|
||||
|
@ -20,10 +20,21 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
{
|
||||
}
|
||||
|
||||
[Theory (Skip = "Bug 1410367")]
|
||||
[InlineData(ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
[InlineData(ImageTestHelperConstants.LatestStretchTag)]
|
||||
public async Task NodeApp_PostgreSqlDBAsync(string imageTag)
|
||||
[Fact(Skip = "Bug #1410367")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Node14App_PostgreSqlDB_WithLatestStretchBuildImageAsync()
|
||||
{
|
||||
await NodeApp_PostgreSqlDBAsync(ImageTestHelperConstants.LatestStretchTag);
|
||||
}
|
||||
|
||||
[Fact(Skip = "Bug #1410367")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task Node14App_PostgreSqlDB_WithGitHubActionsBusterBuildImageAsync()
|
||||
{
|
||||
await NodeApp_PostgreSqlDBAsync(ImageTestHelperConstants.GitHubActionsBuster);
|
||||
}
|
||||
|
||||
private async Task NodeApp_PostgreSqlDBAsync(string imageTag)
|
||||
{
|
||||
await RunTestAsync(
|
||||
"nodejs",
|
||||
|
|
|
@ -15,7 +15,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "node-14-6")]
|
||||
[Trait("category", "node-14-gh-buster")]
|
||||
public class NodePreRunCommandOrScriptTest : NodeEndToEndTestsBase
|
||||
{
|
||||
private readonly string RunScriptPath = "/tmp/startup.sh";
|
||||
|
@ -28,6 +28,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task CanBuildAndRunNodeApp_UsingPreRunCommand_WithDynamicInstallAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -71,7 +72,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster),
|
||||
"/bin/sh",
|
||||
new[]
|
||||
{
|
||||
|
@ -94,6 +95,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task CanBuildAndRunNodeApp_UsingPreRunScript_WithDynamicInstallAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -143,7 +145,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster),
|
||||
"/bin/sh",
|
||||
new[]
|
||||
{
|
||||
|
@ -166,6 +168,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFileAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -194,7 +197,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetLtsVersionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster),
|
||||
"/bin/sh",
|
||||
new[]
|
||||
{
|
||||
|
|
|
@ -20,7 +20,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("14"), Trait("category", "node-14")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("14"), Trait("category", "node-14-stretch-3")]
|
||||
public async Task Test_NodeSassExampleAsync(string nodeVersion)
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -15,7 +15,6 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "node-14")]
|
||||
[Trait("db", "sqlserver")]
|
||||
public class NodeSqlServerIntegrationTests : PlatformEndToEndTestsBase
|
||||
{
|
||||
|
@ -26,10 +25,23 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
{
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
[InlineData(ImageTestHelperConstants.LatestStretchTag)]
|
||||
public async Task NodeApp_MicrosoftSqlServerDBAsync(string imageTag)
|
||||
[Fact]
|
||||
[Trait("category", "node-14-gh-buster")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task NodeApp_MicrosoftSqlServerDBAsync_With_GitHubActionsBusterTag()
|
||||
{
|
||||
await Run_NodeApp_MicrosoftSqlServerDBAsync(ImageTestHelperConstants.GitHubActionsBuster);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-stretch-3")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task NodeApp_MicrosoftSqlServerDBAsync_With_LatestStretchTag()
|
||||
{
|
||||
await Run_NodeApp_MicrosoftSqlServerDBAsync(ImageTestHelperConstants.LatestStretchTag);
|
||||
}
|
||||
|
||||
private async Task Run_NodeApp_MicrosoftSqlServerDBAsync(string imageTag)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "node-mssql";
|
||||
|
|
|
@ -13,7 +13,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "node-14-8")]
|
||||
[Trait("category", "node-14-stretch-1")]
|
||||
public class NodeTestBuildAndRunAppWithDebugger : NodeEndToEndTestsBase
|
||||
{
|
||||
public NodeTestBuildAndRunAppWithDebugger(ITestOutputHelper output, TestTempDirTestFixture fixture)
|
||||
|
@ -22,6 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[MemberData(
|
||||
nameof(TestValueGenerator.GetNodeVersions_SupportDebugging),
|
||||
MemberType = typeof(TestValueGenerator))]
|
||||
|
|
|
@ -13,7 +13,6 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "node-14-9")]
|
||||
public class NodeTestUsingZippedNodeModules : NodeEndToEndTestsBase
|
||||
{
|
||||
public NodeTestUsingZippedNodeModules(ITestOutputHelper output, TestTempDirTestFixture fixture)
|
||||
|
@ -22,6 +21,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("category", "node-14-stretch-2")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[MemberData(nameof(TestValueGenerator.GetNodeVersions), MemberType = typeof(TestValueGenerator))]
|
||||
|
||||
public async Task CanBuildAndRunNodeApp_Using_TarGz_zippedNodeModulesAsync(string nodeVersion)
|
||||
|
@ -69,6 +70,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("category", "node-14-stretch-2")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("14")]
|
||||
public async Task Node_CreateReactAppSample_zippedNodeModulesAsync(string nodeVersion)
|
||||
{
|
||||
|
@ -107,6 +110,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "node-14-stretch-2")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task BuildsAndRunsNodeApp_WhenPruneDevDependenciesIsTrue_AndNodeModulesAreCompressedAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -131,7 +136,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
await EndToEndTestHelper.BuildRunAndAssertAppAsync(
|
||||
appName,
|
||||
_output,
|
||||
new List<DockerVolume> { appOutputDirVolume, volume }, Settings.LtsVersionsBuildImageName,
|
||||
new List<DockerVolume> { appOutputDirVolume, volume },
|
||||
"/bin/bash",
|
||||
new[] { "-c", buildScript },
|
||||
_imageHelper.GetRuntimeImage("node", nodeVersion),
|
||||
|
@ -146,6 +151,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory(Skip = "Bug#1071724")]
|
||||
[Trait("category", "node-14-skipped")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("true")]
|
||||
[InlineData("false")]
|
||||
public async Task CopiesNodeModulesInSubDirectory_ToDestination_WhenNodeModulesAreCompressedAsync(string pruneDevDependency)
|
||||
|
|
|
@ -13,7 +13,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "node-14-10")]
|
||||
[Trait("category", "node-14-stretch-2")]
|
||||
public class NodeTestWithAppInsightsConfigured : NodeEndToEndTestsBase
|
||||
{
|
||||
public NodeTestWithAppInsightsConfigured(ITestOutputHelper output, TestTempDirTestFixture fixture)
|
||||
|
@ -22,6 +22,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("14", "~2", ExtVarNames.UserAppInsightsKeyEnv)]
|
||||
[InlineData("14", "enabled", ExtVarNames.UserAppInsightsConnectionStringEnv)]
|
||||
//Without pre-IPA bits of appInsights, UserAppInsightsExtensionVersion value will be '~2'
|
||||
|
@ -82,6 +83,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("14", "~3", ExtVarNames.UserAppInsightsKeyEnv)]
|
||||
[InlineData("14", "~3", ExtVarNames.UserAppInsightsConnectionStringEnv)]
|
||||
[InlineData("14", "", ExtVarNames.UserAppInsightsKeyEnv)]
|
||||
|
|
|
@ -12,7 +12,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "node-14-11")]
|
||||
[Trait("category", "node-14-stretch-1")]
|
||||
public class NodeWebFrontEndAppTest : NodeEndToEndTestsBase
|
||||
{
|
||||
public NodeWebFrontEndAppTest(ITestOutputHelper output, TestTempDirTestFixture testTempDirTestFixture)
|
||||
|
@ -21,6 +21,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[MemberData(nameof(TestValueGenerator.GetNodeVersions), MemberType = typeof(TestValueGenerator))]
|
||||
public async Task CanBuildAndRun_NodeWebFrontEndAppAsync(string nodeVersion)
|
||||
{
|
||||
|
@ -65,6 +66,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("webfrontend")]
|
||||
[InlineData("webfrontend-yarnlock")]
|
||||
public async Task CanBuildAndRun_NodeWebFrontEndApp_WhenPruneDevDependenciesIsTrueAsync(string appName)
|
||||
|
@ -112,6 +114,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_NodeWebFrontEndApp_AfterRebuild_WhenPruneDevDependenciesIsTrueAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -23,29 +23,28 @@ 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-81")]
|
||||
[Fact, Trait("category", "php-8.1")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task PipelineTestInvocationsPhp81Async()
|
||||
{
|
||||
await CanBuildAndRunAppAsync("8.1");
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-80")]
|
||||
[Fact, Trait("category", "php-8.0")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task PipelineTestInvocationsPhp80Async()
|
||||
{
|
||||
await CanBuildAndRunAppAsync("8.0");
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-74")]
|
||||
[Fact, Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task PipelineTestInvocationsPhp74Async()
|
||||
{
|
||||
await CanBuildAndRunAppAsync("7.4");
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
public async Task CanBuildAndRunAppAsync(string phpVersion)
|
||||
private async Task CanBuildAndRunAppAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var exifImageTypePng = "3";
|
||||
|
@ -71,7 +70,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBuster),
|
||||
"/bin/sh", new[] { "-c", buildScript },
|
||||
_imageHelper.GetRuntimeImage("php", phpVersion),
|
||||
ContainerPort,
|
||||
|
|
|
@ -25,7 +25,8 @@ 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-81")]
|
||||
[Fact, Trait("category", "php-8.1")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp81Async()
|
||||
{
|
||||
string phpVersion81 = "8.1";
|
||||
|
@ -34,7 +35,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmExifExampleAsync(phpVersion81));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-80")]
|
||||
[Fact, Trait("category", "php-8.0")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp80Async()
|
||||
{
|
||||
string phpVersion80 = "8.0";
|
||||
|
@ -43,7 +45,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmExifExampleAsync(phpVersion80));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-74")]
|
||||
[Fact, Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp74Async()
|
||||
{
|
||||
string phpVersion74 = "7.4";
|
||||
|
@ -52,11 +55,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmExifExampleAsync(phpVersion74));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
public async Task ExifExampleAsync(string phpVersion)
|
||||
private async Task ExifExampleAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "exif-example";
|
||||
|
@ -89,11 +88,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
public async Task PhpFpmExifExampleAsync(string phpVersion)
|
||||
private async Task PhpFpmExifExampleAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "exif-example";
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
// platform-version in it's own pipeline agent. This is
|
||||
// because our agents currently a space limit of 10GB.
|
||||
[Theory, Trait("category", "php-8.0")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("10", "10", "7", "7", "8", "8", "6", "6")]
|
||||
[InlineData("", "5", "", "2", "", "3", "", "1")] // defaults
|
||||
[InlineData("false", null, "5", null, "5", null, "5", null, "pm.max_children must be a positive value")]
|
||||
|
@ -49,6 +50,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory, Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("10", "10", "7", "7", "8", "8", "6", "6")]
|
||||
[InlineData("", "5", "", "2", "", "3", "", "1")] // defaults
|
||||
[InlineData("false", null, "5", null, "5", null, "5", null, "pm.max_children must be a positive value")]
|
||||
|
|
|
@ -24,7 +24,8 @@ 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-81")]
|
||||
[Fact, Trait("category", "php-8.1")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp81Async()
|
||||
{
|
||||
string phpVersion81 = "8.1";
|
||||
|
@ -33,7 +34,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmGdExampleAsync(phpVersion81));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-80")]
|
||||
[Fact, Trait("category", "php-8.0")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp80Async()
|
||||
{
|
||||
string phpVersion80 = "8.0";
|
||||
|
@ -42,7 +44,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmGdExampleAsync(phpVersion80));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-74")]
|
||||
[Fact, Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp74Async()
|
||||
{
|
||||
string phpVersion74 = "7.4";
|
||||
|
@ -51,11 +54,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmGdExampleAsync(phpVersion74));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
public async Task GdExampleAsync(string phpVersion)
|
||||
private async Task GdExampleAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "gd-example";
|
||||
|
@ -88,11 +87,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
public async Task PhpFpmGdExampleAsync(string phpVersion)
|
||||
private async Task PhpFpmGdExampleAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "gd-example";
|
||||
|
|
|
@ -24,7 +24,8 @@ 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-81")]
|
||||
[Fact, Trait("category", "php-8.1")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp81Async()
|
||||
{
|
||||
string phpVersion81 = "8.1";
|
||||
|
@ -33,7 +34,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmGreetingsAppTestAsync(phpVersion81));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-80")]
|
||||
[Fact, Trait("category", "php-8.0")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp80Async()
|
||||
{
|
||||
string phpVersion80 = "8.0";
|
||||
|
@ -42,7 +44,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmGreetingsAppTestAsync(phpVersion80));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-74")]
|
||||
[Fact, Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp74Async()
|
||||
{
|
||||
string phpVersion74 = "7.4";
|
||||
|
@ -51,11 +54,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmGreetingsAppTestAsync(phpVersion74));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
public async Task GreetingsAppTestAsync(string phpVersion)
|
||||
private async Task GreetingsAppTestAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "greetings";
|
||||
|
@ -88,11 +87,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
public async Task PhpFpmGreetingsAppTestAsync(string phpVersion)
|
||||
private async Task PhpFpmGreetingsAppTestAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "greetings";
|
||||
|
|
|
@ -23,7 +23,8 @@ 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-74")]
|
||||
[Fact, Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp74Async()
|
||||
{
|
||||
string phpVersion74 = "7.4";
|
||||
|
@ -32,7 +33,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmImagickExampleAsync(phpVersion74));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-80")]
|
||||
[Fact, Trait("category", "php-8.0")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp80Async()
|
||||
{
|
||||
string phpVersion80 = "8.0";
|
||||
|
@ -41,7 +43,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmImagickExampleAsync(phpVersion80));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-81")]
|
||||
[Fact, Trait("category", "php-8.1")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp81Async()
|
||||
{
|
||||
string phpVersion81 = "8.1";
|
||||
|
@ -50,11 +53,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmImagickExampleAsync(phpVersion81));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("7.4")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("8.1")]
|
||||
public async Task ImagickExampleAsync(string phpVersion)
|
||||
private async Task ImagickExampleAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "imagick-example";
|
||||
|
@ -86,11 +85,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("7.4")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("8.1")]
|
||||
public async Task PhpFpmImagickExampleAsync(string phpVersion)
|
||||
private async Task PhpFpmImagickExampleAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "imagick-example";
|
||||
|
|
|
@ -19,22 +19,23 @@ 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-74")]
|
||||
public async Task PipelineTestInvocationsPhp74Async()
|
||||
[Fact]
|
||||
[Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Php74App_UsingMysqli_WithLatestStretchBuildImageAsync()
|
||||
{
|
||||
string phpVersion74 = "7.4";
|
||||
await Task.WhenAll(
|
||||
PhpApp_UsingMysqliAsync(phpVersion74, ImageTestHelperConstants.LatestStretchTag),
|
||||
PhpApp_UsingMysqliAsync(phpVersion74, ImageTestHelperConstants.GitHubActionsStretch));
|
||||
await PhpApp_UsingMysqliAsync("7.4", ImageTestHelperConstants.LatestStretchTag);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("7.4", ImageTestHelperConstants.LatestStretchTag)]
|
||||
[InlineData("7.4", ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
public async Task PhpApp_UsingMysqliAsync(string phpVersion, string imageTag)
|
||||
[Fact]
|
||||
[Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task Php74App_UsingMysqli_WithGitHubActionsBusterBuildImageAsync()
|
||||
{
|
||||
await PhpApp_UsingMysqliAsync("7.4", ImageTestHelperConstants.GitHubActionsBuster);
|
||||
}
|
||||
|
||||
private async Task PhpApp_UsingMysqliAsync(string phpVersion, string imageTag)
|
||||
{
|
||||
await RunTestAsync(
|
||||
"php",
|
||||
|
|
|
@ -11,7 +11,6 @@ using Xunit.Abstractions;
|
|||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Collection("Php integration")]
|
||||
[Trait("category", "php-74")]
|
||||
[Trait("db", "postgres")]
|
||||
public class PhpPostgreSqlIntegrationTests : DatabaseTestsBase, IClassFixture<Fixtures.PostgreSqlDbContainerFixture>
|
||||
{
|
||||
|
@ -20,9 +19,15 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
{
|
||||
}
|
||||
|
||||
[Theory(Skip = "Bug 1410367") ]
|
||||
[InlineData("7.4")]
|
||||
public async Task PhpAppAsync(string phpVersion)
|
||||
[Fact(Skip = "Bug #1410367")]
|
||||
[Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Php74AppAsync()
|
||||
{
|
||||
await PhpAppAsync("7.4");
|
||||
}
|
||||
|
||||
private async Task PhpAppAsync(string phpVersion)
|
||||
{
|
||||
await RunTestAsync(
|
||||
"php",
|
||||
|
|
|
@ -15,7 +15,7 @@ using Xunit.Abstractions;
|
|||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Collection("Php integration")]
|
||||
[Trait("category", "php-74")]
|
||||
[Trait("category", "php-7.4")]
|
||||
public class PhpPreRunCommandOrScriptTest : PhpEndToEndTestsBase
|
||||
{
|
||||
public PhpPreRunCommandOrScriptTest(ITestOutputHelper output, TestTempDirTestFixture fixture)
|
||||
|
@ -24,6 +24,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task TwigExampleCanBuildAndRun_UsingPreRunCommandAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -70,6 +71,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task TwigExampleCanBuildAndRun_UsingPreRunScriptAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -120,6 +122,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task TwigExampleCanBuildAndRun_UsingPreRunScriptToInstallExtensionAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -174,6 +177,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFileAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// Licensed under the MIT license.
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -25,38 +24,39 @@ 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-80")]
|
||||
public async Task PipelineTestInvocationsPhp80Async()
|
||||
{
|
||||
string phpVersion80 = "8.0";
|
||||
await Task.WhenAll(
|
||||
PhpApp_UsingPdoAsync(phpVersion80, ImageTestHelperConstants.GitHubActionsStretch),
|
||||
PhpApp_UsingPdoAsync(phpVersion80, ImageTestHelperConstants.GitHubActionsBuster),
|
||||
PhpApp_UsingPdoAsync(phpVersion80, ImageTestHelperConstants.LatestStretchTag));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-74")]
|
||||
public async Task PipelineTestInvocationsPhp74Async()
|
||||
[Fact]
|
||||
[Trait("category", "7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Php74App_UsingPdo_WithLatestStretchBuildImageAsync()
|
||||
{
|
||||
string phpVersion74 = "7.4";
|
||||
await Task.WhenAll(
|
||||
PhpApp_UsingPdoAsync(phpVersion74, ImageTestHelperConstants.GitHubActionsStretch),
|
||||
PhpApp_UsingPdoAsync(phpVersion74, ImageTestHelperConstants.GitHubActionsBuster),
|
||||
PhpApp_UsingPdoAsync(phpVersion74, ImageTestHelperConstants.LatestStretchTag));
|
||||
await PhpApp_UsingPdoAsync("7.4", ImageTestHelperConstants.LatestStretchTag);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("7.4", ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
[InlineData("7.4", ImageTestHelperConstants.GitHubActionsBuster)]
|
||||
[InlineData("7.4", ImageTestHelperConstants.LatestStretchTag)]
|
||||
[InlineData("8.0", ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
[InlineData("8.0", ImageTestHelperConstants.GitHubActionsBuster)]
|
||||
[InlineData("8.0", ImageTestHelperConstants.LatestStretchTag)]
|
||||
public async Task PhpApp_UsingPdoAsync(string phpVersion, string imageTag)
|
||||
[Fact]
|
||||
[Trait("category", "7.4")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task Php74App_UsingPdo_WithGitHubActionsBusterBuildImageAsync()
|
||||
{
|
||||
await PhpApp_UsingPdoAsync("7.4", ImageTestHelperConstants.GitHubActionsBuster);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "8.0")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Php80App_UsingPdo_WithLatestStretchBuildImageAsync()
|
||||
{
|
||||
await PhpApp_UsingPdoAsync("8.0", ImageTestHelperConstants.LatestStretchTag);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "8.0")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task Php80App_UsingPdo_WithGitHubActionsBusterBuildImageAsync()
|
||||
{
|
||||
await PhpApp_UsingPdoAsync("8.0", ImageTestHelperConstants.GitHubActionsBuster);
|
||||
}
|
||||
|
||||
private async Task PhpApp_UsingPdoAsync(string phpVersion, string imageTag)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "sqlsrv-example";
|
||||
|
|
|
@ -23,7 +23,8 @@ 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-81")]
|
||||
[Fact, Trait("category", "php-8.1")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp81Async()
|
||||
{
|
||||
string phpVersion81 = "8.1";
|
||||
|
@ -32,7 +33,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmTwigExampleAsync(phpVersion81));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-80")]
|
||||
[Fact, Trait("category", "php-8.0")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp80Async()
|
||||
{
|
||||
string phpVersion80 = "8.0";
|
||||
|
@ -41,7 +43,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmTwigExampleAsync(phpVersion80));
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-74")]
|
||||
[Fact, Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp74Async()
|
||||
{
|
||||
string phpVersion74 = "7.4";
|
||||
|
@ -50,12 +53,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
PhpFpmTwigExampleAsync(phpVersion74));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
// Twig does not support PHP < 7
|
||||
public async Task TwigExampleAsync(string phpVersion)
|
||||
private async Task TwigExampleAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "twig-example";
|
||||
|
@ -87,12 +86,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
// Twig does not support PHP < 7
|
||||
public async Task PhpFpmTwigExampleAsync(string phpVersion)
|
||||
private async Task PhpFpmTwigExampleAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "twig-example";
|
||||
|
|
|
@ -26,29 +26,28 @@ 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-81")]
|
||||
[Fact, Trait("category", "php-8.1")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp81Async()
|
||||
{
|
||||
await PhpFpmWithWordPress56Async("8.1-fpm");
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-80")]
|
||||
[Fact, Trait("category", "php-8.0")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp80Async()
|
||||
{
|
||||
await PhpFpmWithWordPress56Async("8.0-fpm");
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-74")]
|
||||
[Fact, Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp74Async()
|
||||
{
|
||||
await PhpFpmWithWordPress56Async("7.4-fpm");
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1-fpm")]
|
||||
[InlineData("8.0-fpm")]
|
||||
[InlineData("7.4-fpm")]
|
||||
public async Task PhpFpmWithWordPress56Async(string phpVersion)
|
||||
private async Task PhpFpmWithWordPress56Async(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
string hostDir = Path.Combine(_tempRootDir, Guid.NewGuid().ToString("N"));
|
||||
|
|
|
@ -26,21 +26,24 @@ 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-81")]
|
||||
[Fact, Trait("category", "php-8.1")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp81Async()
|
||||
{
|
||||
string phpVersion81 = "8.1";
|
||||
await CanBuildAndRun_Wordpress_SampleAppAsync(phpVersion81);
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-80")]
|
||||
[Fact, Trait("category", "php-8.0")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp80Async()
|
||||
{
|
||||
string phpVersion80 = "8.0";
|
||||
await CanBuildAndRun_Wordpress_SampleAppAsync(phpVersion80);
|
||||
}
|
||||
|
||||
[Fact, Trait("category", "php-74")]
|
||||
[Fact, Trait("category", "php-7.4")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PipelineTestInvocationsPhp74Async()
|
||||
{
|
||||
string phpVersion74 = "7.4";
|
||||
|
@ -49,11 +52,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
CanBuildAndRun_Wordpress_SampleAppAsync(phpVersion74));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
public async Task PhpWithWordPress51Async(string phpVersion)
|
||||
private async Task PhpWithWordPress51Async(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
string hostDir = Path.Combine(_tempRootDir, Guid.NewGuid().ToString("N"));
|
||||
|
@ -99,11 +98,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("8.1")]
|
||||
[InlineData("8.0")]
|
||||
[InlineData("7.4")]
|
||||
public async Task CanBuildAndRun_Wordpress_SampleAppAsync(string phpVersion)
|
||||
private async Task CanBuildAndRun_Wordpress_SampleAppAsync(string phpVersion)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "wordpress-example";
|
||||
|
|
|
@ -15,7 +15,7 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace Microsoft.Oryx.Integration.Tests
|
||||
{
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
public class Python37EndToEndTests : PythonEndToEndTestsBase
|
||||
{
|
||||
public Python37EndToEndTests(ITestOutputHelper output, TestTempDirTestFixture testTempDirTestFixture)
|
||||
|
@ -24,6 +24,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("3.7")]
|
||||
public async Task CanBuildAndRunPythonAppAsync(string pythonVersion)
|
||||
{
|
||||
|
@ -68,6 +69,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunPythonApp_UsingPython37_AndVirtualEnvAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -122,6 +124,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("tar-gz", "tar.gz")]
|
||||
[InlineData("zip", "zip")]
|
||||
public async Task CanBuildAndRunPythonApp_UsingPython37_AndCompressedVirtualEnvAsync(
|
||||
|
@ -182,6 +185,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunPythonApp_UsingCustomManifestFileLocationAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -244,6 +248,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_DjangoApp_DoingCollectStaticByDefaultAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -296,6 +301,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_DjangoPython37App_UsingVirtualEnvAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -352,6 +358,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPythonApp_WhenAllOutputIsCompressedAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -380,7 +387,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBullseye),
|
||||
"/bin/bash", new[] { "-c", buildScript },
|
||||
_imageHelper.GetRuntimeImage("python", pythonVersion),
|
||||
ContainerPort,
|
||||
|
|
|
@ -20,7 +20,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanRunPythonApp_UsingEarlierBuiltPackagesDirectoryAsync()
|
||||
{
|
||||
// This is AppService's scenario where previously built apps can still run
|
||||
|
@ -77,7 +78,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanRunPythonApp_WithoutBuildManifestFileAsync()
|
||||
{
|
||||
// This is AppService's scenario where previously built apps can still run
|
||||
|
|
|
@ -20,7 +20,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("category", "python-38")]
|
||||
[Trait("category", "python-3.8")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("3.8")]
|
||||
public async Task CanBuildAndRunPythonApp_UsingCustomStartUpScriptAsync(string pythonVersion)
|
||||
{
|
||||
|
@ -71,7 +72,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("category", "python-38")]
|
||||
[Trait("category", "python-3.8")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("3.8")]
|
||||
public async Task CanBuildAndRunPythonApp_UsingCustomStartUpCommandAsync(string pythonVersion)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("3.7", 5637)] // Test with a non-default port as well
|
||||
public async Task CanBuildAndDebugFlaskAppAsync(string pythonVersion, int? debugPort = null)
|
||||
{
|
||||
|
@ -65,7 +66,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("3.7", 5637)] // Test with a non-default port as well
|
||||
public async Task CanBuildAndDebugFlaskAppWithDebugPyAsync(string pythonVersion, int? debugPort = null)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_MultiPlatformApp_HavingReactAndDjangoAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -22,59 +22,94 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-37")]
|
||||
public async Task RunPython37IntegrationTests()
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPython37AppAsync()
|
||||
{
|
||||
// Temporarily skip - Bug #1266781
|
||||
// await CanBuildAndRunPythonAppAsync("3.7");
|
||||
// await CanBuildAndRunPythonAppAsync("3.7", ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-3.8")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPython38AppAsync()
|
||||
{
|
||||
// Temporarily skip - Bug #1266781
|
||||
// await CanBuildAndRunPythonAppAsync("3.8", ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-3.9")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task CanBuildAndRunPython39AppAsync()
|
||||
{
|
||||
// Temporarily skip - Bug #1266781
|
||||
// await CanBuildAndRunPythonAppAsync("3.9", ImageTestHelperConstants.GitHubActionsBuster);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPython37App_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync()
|
||||
{
|
||||
// Temporarily skip - Bug #1410367
|
||||
// await CanBuildAndRunPythonApp_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync("PythonVersions.Python37Version");
|
||||
|
||||
await CanBuildAndRunPythonApp_UsingScriptCommandAndSetEnvSwitchAsync();
|
||||
|
||||
// Temporarily skip - Bug #1266781
|
||||
// await CanBuildAndRunPythonAppWhenUsingPackageDirSwitchAsync(true);
|
||||
// await CanBuildAndRunPythonAppWhenUsingPackageDirSwitchAsync(false);
|
||||
// await CanBuildAndRunPythonApp_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync("PythonVersions.Python37Version", ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-38")]
|
||||
public async Task RunPython38IntegrationTests()
|
||||
[Trait("category", "python-3.8")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPython38App_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync()
|
||||
{
|
||||
// Temporarily skip - Bug #1266781
|
||||
// await CanBuildAndRunPythonAppAsync("3.8");
|
||||
|
||||
// Temporarily skip - Bug #1410367
|
||||
// await CanBuildAndRunPythonApp_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync("PythonVersions.Python38Version");
|
||||
// await CanBuildAndRunPythonApp_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync("PythonVersions.Python38Version", ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-39")]
|
||||
public async Task RunPython39IntegrationTests()
|
||||
[Trait("category", "python-3.9")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
public async Task CanBuildAndRunPython39App_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync()
|
||||
{
|
||||
// Temporarily skip - Bug #1410367
|
||||
// await CanBuildAndRunPythonApp_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync("PythonVersions.Python39Version", ImageTestHelperConstants.GitHubActionsBuster);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-3.10")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPython310App_UsingGitHubActionsBullseyeBuildImage_AndDynamicRuntimeInstallationAsync()
|
||||
{
|
||||
await CanBuildAndRunPythonApp_UsingGitHubActionsBullseyeBuildImage_AndDynamicRuntimeInstallationAsync("3.10", ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-3.11")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPython311App_UsingGitHubActionsBullseyeBuildImage_AndDynamicRuntimeInstallationAsync()
|
||||
{
|
||||
await CanBuildAndRunPythonApp_UsingGitHubActionsBullseyeBuildImage_AndDynamicRuntimeInstallationAsync("3.11", ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPython37App_UsingScriptCommandAndSetEnvSwitchAsync()
|
||||
{
|
||||
await CanBuildAndRunPythonApp_UsingScriptCommandAndSetEnvSwitchAsync(ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPython37App_WhenUsingPackageDirSwitchAsync()
|
||||
{
|
||||
// Temporarily skip - Bug #1266781
|
||||
// await CanBuildAndRunPythonAppAsync("3.9");
|
||||
|
||||
// Temporarily skip - Bug #1410367
|
||||
// await CanBuildAndRunPythonApp_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync("PythonVersions.Python39Version");
|
||||
// await CanBuildAndRunPythonAppWhenUsingPackageDirSwitchAsync(true, ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
// await CanBuildAndRunPythonAppWhenUsingPackageDirSwitchAsync(false, ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-310")]
|
||||
public async Task RunPython310IntegrationTests()
|
||||
{
|
||||
await CanBuildAndRunPythonApp_UsingGitHubActionsBullseyeBuildImage_AndDynamicRuntimeInstallationAsync("3.10");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-311")]
|
||||
public async Task RunPython311IntegrationTests()
|
||||
{
|
||||
await CanBuildAndRunPythonApp_UsingGitHubActionsBullseyeBuildImage_AndDynamicRuntimeInstallationAsync("3.11");
|
||||
}
|
||||
|
||||
private async Task CanBuildAndRunPythonAppAsync(string pythonVersion)
|
||||
private async Task CanBuildAndRunPythonAppAsync(string pythonVersion, string debianFlavor = null)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "flask-app";
|
||||
|
@ -100,7 +135,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetLtsVersionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(debianFlavor),
|
||||
"/bin/bash", new[] { "-c", buildScript },
|
||||
_imageHelper.GetRuntimeImage("python", pythonVersion),
|
||||
ContainerPort,
|
||||
|
@ -114,7 +149,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
private async Task CanBuildAndRunPythonApp_UsingGitHubActionsBuildImage_AndDynamicRuntimeInstallationAsync(
|
||||
string pythonVersion)
|
||||
string pythonVersion,
|
||||
string debianFlavor = null)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "flask-app";
|
||||
|
@ -139,7 +175,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(debianFlavor),
|
||||
"/bin/bash", new[] { "-c", buildScript },
|
||||
_imageHelper.GetRuntimeImage("python", "dynamic"),
|
||||
ContainerPort,
|
||||
|
@ -153,7 +189,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
private async Task CanBuildAndRunPythonApp_UsingGitHubActionsBullseyeBuildImage_AndDynamicRuntimeInstallationAsync(
|
||||
string pythonVersion)
|
||||
string pythonVersion,
|
||||
string debianFlavor = null)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "django-app";
|
||||
|
@ -178,7 +215,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBullseye),
|
||||
_imageHelper.GetGitHubActionsBuildImage(debianFlavor),
|
||||
"/bin/bash", new[] { "-c", buildScript },
|
||||
_imageHelper.GetRuntimeImage("python", pythonVersion),
|
||||
ContainerPort,
|
||||
|
@ -200,7 +237,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
private async Task CanBuildAndRunPythonApp_UsingScriptCommandAndSetEnvSwitchAsync()
|
||||
private async Task CanBuildAndRunPythonApp_UsingScriptCommandAndSetEnvSwitchAsync(string debianFlavor = null)
|
||||
{
|
||||
// Arrange
|
||||
var pythonVersion = "3.7";
|
||||
|
@ -227,7 +264,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetLtsVersionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(debianFlavor),
|
||||
"/bin/bash", new[] { "-c", buildScript },
|
||||
_imageHelper.GetRuntimeImage("python", "dynamic"),
|
||||
ContainerPort,
|
||||
|
@ -249,7 +286,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
});
|
||||
}
|
||||
|
||||
private async Task CanBuildAndRunPythonAppWhenUsingPackageDirSwitchAsync(bool compressDestinationDir)
|
||||
private async Task CanBuildAndRunPythonAppWhenUsingPackageDirSwitchAsync(bool compressDestinationDir, string debianFlavor = null)
|
||||
{
|
||||
// Arrange
|
||||
var pythonVersion = "3.7";
|
||||
|
@ -278,7 +315,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(debianFlavor),
|
||||
"/bin/bash", new[] { "-c", buildScript },
|
||||
_imageHelper.GetRuntimeImage("python", "3.7"),
|
||||
ContainerPort,
|
||||
|
|
|
@ -21,7 +21,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRun_Tweeter3AppAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -66,7 +67,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("3.7")]
|
||||
public async Task BuildWithVirtualEnv_RemovesOryxPackagesDir_FromOlderBuildAsync(string pythonVersion)
|
||||
{
|
||||
|
@ -121,14 +123,16 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact(Skip = "Bug #1410367")]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task BuildWithVirtualEnv_From_File_Requirement_TxtAsync_WithPython37()
|
||||
{
|
||||
await BuildWithVirtualEnv_From_File_Requirement_TxtAsync("3.7");
|
||||
}
|
||||
|
||||
[Fact(Skip = "Bug #1410367")]
|
||||
[Trait("category", "python-38")]
|
||||
[Trait("category", "python-3.8")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task BuildWithVirtualEnv_From_File_Requirement_TxtAsync_WithPython38()
|
||||
{
|
||||
await BuildWithVirtualEnv_From_File_Requirement_TxtAsync("3.8");
|
||||
|
@ -174,7 +178,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact(Skip = "Bug #1410367") ]
|
||||
[Trait("category", "python-38")]
|
||||
[Trait("category", "python-3.8")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunPythonApp_UsingOutputDirectory_NestedUnderSourceDirectoryAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -218,7 +223,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact (Skip = "Bug #1410367")]
|
||||
[Trait("category", "python-38")]
|
||||
[Trait("category", "python-3.8")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunPythonApp_UsingIntermediateDir_AndNestedOutputDirectoryAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -19,7 +19,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact(Skip = "work item #1122020")]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task CanBuildAndRunPythonApp_UsingGunicornMultipleWorkersAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -19,37 +19,47 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
{
|
||||
}
|
||||
|
||||
[Theory(Skip = "Bug 1410367") ]
|
||||
[Trait("category", "python-37")]
|
||||
[InlineData("mysql-pymysql-sample", ImageTestHelperConstants.LatestStretchTag)]
|
||||
[InlineData("mysql-pymysql-sample", ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
[InlineData("mysql-mysqlconnector-sample", ImageTestHelperConstants.LatestStretchTag)]
|
||||
[InlineData("mysql-mysqlconnector-sample", ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
[InlineData("mysql-mysqlclient-sample", ImageTestHelperConstants.LatestStretchTag)]
|
||||
[InlineData("mysql-mysqlclient-sample", ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
public async Task Python37App_MySqlDB_UsingPyMySql_UsingLtsVersionsBuildImageAsync(
|
||||
string sampleAppName,
|
||||
string imageTag)
|
||||
[Theory(Skip = "Bug #1410367")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
[InlineData("mysql-pymysql-sample")]
|
||||
[InlineData("mysql-mysqlconnector-sample")]
|
||||
[InlineData("mysql-mysqlclient-sample")]
|
||||
public async Task Python37App_MySqlDB_UsingPyMySql_UsingLatestStretchBuildImageAsync(string sampleAppName)
|
||||
{
|
||||
await RunTestAsync(
|
||||
"python",
|
||||
"3.7",
|
||||
Path.Combine(HostSamplesDir, "python", sampleAppName),
|
||||
buildImageName: _imageHelper.GetBuildImage(imageTag));
|
||||
await PythonApp_MySqlDB_UsingPyMySqlAsync("3.7", sampleAppName, ImageTestHelperConstants.LatestStretchTag);
|
||||
}
|
||||
|
||||
[Theory(Skip = "Bug 1410367") ]
|
||||
[Trait("category", "python-39")]
|
||||
[InlineData("mysql-pymysql-sample", ImageTestHelperConstants.GitHubActionsBuster)]
|
||||
[InlineData("mysql-mysqlconnector-sample", ImageTestHelperConstants.GitHubActionsBuster)]
|
||||
[InlineData("mysql-mysqlclient-sample", ImageTestHelperConstants.GitHubActionsBuster)]
|
||||
public async Task Python39App_MySqlDB_UsingPyMySql_UsingBusterBuildImageAsync(
|
||||
[Theory(Skip = "Bug #1410367")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
[InlineData("mysql-pymysql-sample")]
|
||||
[InlineData("mysql-mysqlconnector-sample")]
|
||||
[InlineData("mysql-mysqlclient-sample")]
|
||||
public async Task Python37App_MySqlDB_UsingPyMySql_UsingGitHubActionsBullseyeBuildImageAsync(string sampleAppName)
|
||||
{
|
||||
await PythonApp_MySqlDB_UsingPyMySqlAsync("3.7", sampleAppName, ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Theory(Skip = "Bug #1410367")]
|
||||
[Trait("category", "python-3.9")]
|
||||
[Trait("build-image", "github-actions-debian-buster")]
|
||||
[InlineData("mysql-pymysql-sample")]
|
||||
[InlineData("mysql-mysqlconnector-sample")]
|
||||
[InlineData("mysql-mysqlclient-sample")]
|
||||
public async Task Python39App_MySqlDB_UsingPyMySql_UsingGitHubActionsBusterBuildImageAsync(string sampleAppName)
|
||||
{
|
||||
await PythonApp_MySqlDB_UsingPyMySqlAsync("3.9", sampleAppName, ImageTestHelperConstants.GitHubActionsBuster);
|
||||
}
|
||||
|
||||
private async Task PythonApp_MySqlDB_UsingPyMySqlAsync(
|
||||
string pythonVersion,
|
||||
string sampleAppName,
|
||||
string imageTag)
|
||||
{
|
||||
await RunTestAsync(
|
||||
"python",
|
||||
"3.9",
|
||||
pythonVersion,
|
||||
Path.Combine(HostSamplesDir, "python", sampleAppName),
|
||||
buildImageName: _imageHelper.GetBuildImage(imageTag));
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PythonStartupScript_UsesPortEnvironmentVariableValueAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -74,7 +75,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task PythonStartupScript_UsesSuppliedBindingPort_EvenIfPortEnvironmentVariableValue_IsPresentAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
|
|
@ -19,19 +19,29 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
{
|
||||
}
|
||||
|
||||
[Theory(Skip = "Bug 1410367") ]
|
||||
[Trait("category", "python-37")]
|
||||
[InlineData(ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
[InlineData(ImageTestHelperConstants.GitHubActionsBuster)]
|
||||
[InlineData(ImageTestHelperConstants.LatestStretchTag)]
|
||||
public async Task Python37App_PostgreSqlDBAsync(string imageTag)
|
||||
[Fact(Skip = "Bug #1410367")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task Python37App_PostgreSqlDB_WithGitHubActionsBullseyeBuildImageAsync()
|
||||
{
|
||||
await PythonApp_PostgreSqlDBAsync("3.7", ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Fact(Skip = "Bug #1410367")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Python37App_PostgreSqlDB_WithLatestStretchBuildImageAsync()
|
||||
{
|
||||
await PythonApp_PostgreSqlDBAsync("3.7", ImageTestHelperConstants.LatestStretchTag);
|
||||
}
|
||||
|
||||
private async Task PythonApp_PostgreSqlDBAsync(string pythonVersion, string imageTag)
|
||||
{
|
||||
await RunTestAsync(
|
||||
"python",
|
||||
"3.7",
|
||||
pythonVersion,
|
||||
Path.Combine(HostSamplesDir, "python", "postgres-sample"),
|
||||
buildImageName: _imageHelper.GetBuildImage(imageTag));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -27,7 +27,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact(Skip = "Bug 1410367")]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPythonApp_UsingPreRunCommand_WithDynamicInstallAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -72,7 +73,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBullseye),
|
||||
"/bin/bash", new[] { "-c", buildScript },
|
||||
_imageHelper.GetRuntimeImage("python", "dynamic"),
|
||||
ContainerPort,
|
||||
|
@ -86,7 +87,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact(Skip = "Bug 1410367") ]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanBuildAndRunPythonApp_UsingPreRunScript_WithDynamicInstallAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -138,7 +140,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetGitHubActionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBullseye),
|
||||
"/bin/bash", new[] { "-c", buildScript },
|
||||
_imageHelper.GetRuntimeImage("python", "dynamic"),
|
||||
ContainerPort,
|
||||
|
@ -152,7 +154,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact (Skip = "Bug 1410367")]
|
||||
[Trait("category", "python-38")]
|
||||
[Trait("category", "python-3.8")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task CanRunApp_UsingPreRunCommand_FromBuildEnvFileAsync()
|
||||
{
|
||||
// Arrange
|
||||
|
@ -180,7 +183,7 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
appName,
|
||||
_output,
|
||||
new DockerVolume[] { volume, appOutputDirVolume },
|
||||
_imageHelper.GetLtsVersionsBuildImage(),
|
||||
_imageHelper.GetGitHubActionsBuildImage(ImageTestHelperConstants.GitHubActionsBullseye),
|
||||
"/bin/bash",
|
||||
new[]
|
||||
{
|
||||
|
|
|
@ -20,7 +20,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-37")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task RunPython37ShapelyAppTests()
|
||||
{
|
||||
await CanBuildAndRun_ShapelyFlaskApp_UsingVirtualEnvAsync("3.7");
|
||||
|
@ -28,7 +29,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-38")]
|
||||
[Trait("category", "python-3.8")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task RunPython38ShapelyAppTests()
|
||||
{
|
||||
await CanBuildAndRun_ShapelyFlaskApp_UsingVirtualEnvAsync("3.8");
|
||||
|
@ -36,7 +38,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("category", "python-39")]
|
||||
[Trait("category", "python-3.9")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task RunPython39ShapelyAppTests()
|
||||
{
|
||||
await CanBuildAndRun_ShapelyFlaskApp_UsingVirtualEnvAsync("3.9");
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// Licensed under the MIT license.
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -25,12 +24,23 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
{
|
||||
}
|
||||
|
||||
[Theory(Skip = "Bug #1274414")]
|
||||
[Trait("category", "python-37")]
|
||||
[InlineData(ImageTestHelperConstants.GitHubActionsStretch)]
|
||||
[InlineData(ImageTestHelperConstants.GitHubActionsBuster)]
|
||||
[InlineData(ImageTestHelperConstants.LatestStretchTag)]
|
||||
public async Task Python37App_MicrosoftSqlServerDBAsync(string imageTag)
|
||||
[Fact(Skip = "Bug #1274414")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "github-actions-debian-bullseye")]
|
||||
public async Task Python37App_MicrosoftSqlServerDB_WithGitHubActionsBullseyeBuildImageAsync()
|
||||
{
|
||||
await PythonApp_MicrosoftSqlServerDBAsync("3.7", ImageTestHelperConstants.GitHubActionsBullseye);
|
||||
}
|
||||
|
||||
[Fact(Skip = "Bug #1274414")]
|
||||
[Trait("category", "python-3.7")]
|
||||
[Trait("build-image", "debian-stretch")]
|
||||
public async Task Python37App_MicrosoftSqlServerDB_WithLatestStretchBuildImageAsync()
|
||||
{
|
||||
await PythonApp_MicrosoftSqlServerDBAsync("3.7", ImageTestHelperConstants.LatestStretchTag);
|
||||
}
|
||||
|
||||
private async Task PythonApp_MicrosoftSqlServerDBAsync(string pythonVersion, string imageTag)
|
||||
{
|
||||
// Arrange
|
||||
var appName = "mssqlserver-sample";
|
||||
|
@ -48,8 +58,8 @@ namespace Microsoft.Oryx.Integration.Tests
|
|||
new List<DockerVolume> { volume },
|
||||
_imageHelper.GetBuildImage(imageTag),
|
||||
"oryx",
|
||||
new[] { "build", appDir, "--platform", "python", "--platform-version", "3.7" },
|
||||
_imageHelper.GetRuntimeImage("python", "3.7"),
|
||||
new[] { "build", appDir, "--platform", "python", "--platform-version", pythonVersion },
|
||||
_imageHelper.GetRuntimeImage("python", pythonVersion),
|
||||
SqlServerDbTestHelper.GetEnvironmentVariables(),
|
||||
ContainerPort,
|
||||
"/bin/bash",
|
||||
|
|
|
@ -2,273 +2,32 @@ parameters:
|
|||
- name: storageAccountUrl
|
||||
type: string
|
||||
default: https://oryxsdksdev.blob.core.windows.net
|
||||
- name: pythonVersions
|
||||
type: object
|
||||
default:
|
||||
- 37
|
||||
- 38
|
||||
- 39
|
||||
- 310
|
||||
- 311
|
||||
- name: nodeVersions
|
||||
type: object
|
||||
default:
|
||||
- 14
|
||||
- 14-3
|
||||
- 14-4
|
||||
- 14-5
|
||||
- 14-6
|
||||
- 14-8
|
||||
- 14-9
|
||||
- 14-10
|
||||
- 14-11
|
||||
- 16
|
||||
- name: dotNetCoreVersions
|
||||
type: object
|
||||
default:
|
||||
- 30
|
||||
- 31
|
||||
- 50
|
||||
- 60
|
||||
- dynamic
|
||||
- runtime
|
||||
- name: phpVersions
|
||||
type: object
|
||||
default:
|
||||
- 74
|
||||
- 80
|
||||
- 81
|
||||
- name: golangVersions
|
||||
type: object
|
||||
default:
|
||||
- full
|
||||
|
||||
jobs:
|
||||
# Python integration tests
|
||||
- ${{ each pythonVersion in parameters.pythonVersions }}:
|
||||
- job:
|
||||
displayName: 'Run Python ${{ pythonVersion }} Integration Tests'
|
||||
dependsOn:
|
||||
- Job_BuildImage_Latest
|
||||
- Job_BuildImage_LtsVersions
|
||||
- Job_BuildImage_Jamstack
|
||||
- Job_BuildImage_GithubActions
|
||||
- Job_BuildImage_VsoFocal
|
||||
- Job_BuildImage_Full
|
||||
- Job_BuildImage_Cli
|
||||
- Job_BuildImage_CliBuster
|
||||
- Job_BuildImage_Buildpack
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=python-${{ pythonVersion }}"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
- template: integrationTests/_pythonIntegrationJobTemplate.yml
|
||||
parameters:
|
||||
storageAccountUrl: ${{ parameters.storageAccountUrl }}
|
||||
|
||||
# DotNetCore integration tests
|
||||
- ${{ each dotNetCoreVersion in parameters.dotNetCoreVersions }}:
|
||||
- job:
|
||||
displayName: 'Run DotNetCore ${{ dotNetCoreVersion }} Integration Tests'
|
||||
dependsOn:
|
||||
- Job_BuildImage_Latest
|
||||
- Job_BuildImage_LtsVersions
|
||||
- Job_BuildImage_Jamstack
|
||||
- Job_BuildImage_GithubActions
|
||||
- Job_BuildImage_VsoFocal
|
||||
- Job_BuildImage_VsoBullseye
|
||||
- Job_BuildImage_Full
|
||||
- Job_BuildImage_Cli
|
||||
- Job_BuildImage_CliBuster
|
||||
- Job_BuildImage_Buildpack
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=dotnetcore-${{ dotNetCoreVersion }}"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
- template: integrationTests/_dotnetcoreIntegrationJobTemplate.yml
|
||||
parameters:
|
||||
storageAccountUrl: ${{ parameters.storageAccountUrl }}
|
||||
|
||||
# NodeJS integration tests
|
||||
- ${{ each nodeVersion in parameters.nodeVersions }}:
|
||||
- job:
|
||||
displayName: 'Run Node ${{ nodeVersion }} Integration Tests'
|
||||
dependsOn:
|
||||
- Job_BuildImage_Latest
|
||||
- Job_BuildImage_LtsVersions
|
||||
- Job_BuildImage_Jamstack
|
||||
- Job_BuildImage_GithubActions
|
||||
- Job_BuildImage_VsoFocal
|
||||
- Job_BuildImage_Full
|
||||
- Job_BuildImage_Cli
|
||||
- Job_BuildImage_CliBuster
|
||||
- Job_BuildImage_Buildpack
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=node-${{ nodeVersion }}"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
- template: integrationTests/_nodeIntegrationJobTemplate.yml
|
||||
parameters:
|
||||
storageAccountUrl: ${{ parameters.storageAccountUrl }}
|
||||
|
||||
# Golang integration tests
|
||||
- ${{ each golangVersion in parameters.golangVersions }}:
|
||||
- job:
|
||||
displayName: 'Run Golang ${{ golangVersion }} Integration Tests'
|
||||
dependsOn:
|
||||
- Job_BuildImage_Latest
|
||||
- Job_BuildImage_LtsVersions
|
||||
- Job_BuildImage_Jamstack
|
||||
- Job_BuildImage_GithubActions
|
||||
- Job_BuildImage_VsoFocal
|
||||
- Job_BuildImage_Full
|
||||
- Job_BuildImage_Cli
|
||||
- Job_BuildImage_CliBuster
|
||||
- Job_BuildImage_Buildpack
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=golang-${{ golangVersion }}"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
- template: integrationTests/_golangIntegrationJobTemplate.yml
|
||||
parameters:
|
||||
storageAccountUrl: ${{ parameters.storageAccountUrl }}
|
||||
|
||||
# Php integration tests
|
||||
- ${{ each phpVersion in parameters.phpVersions }}:
|
||||
- job:
|
||||
displayName: 'Run Php ${{ phpVersion }} Integration Tests'
|
||||
dependsOn:
|
||||
- Job_BuildImage_Latest
|
||||
- Job_BuildImage_LtsVersions
|
||||
- Job_BuildImage_Jamstack
|
||||
- Job_BuildImage_GithubActions
|
||||
- Job_BuildImage_VsoFocal
|
||||
- Job_BuildImage_Full
|
||||
- Job_BuildImage_Cli
|
||||
- Job_BuildImage_CliBuster
|
||||
- Job_BuildImage_Buildpack
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=php-${{ phpVersion }}"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
|
||||
- job: Job_DbIntegrationTests
|
||||
displayName: Run Database Integration Tests
|
||||
dependsOn:
|
||||
- Job_BuildImage_Latest
|
||||
- Job_BuildImage_LtsVersions
|
||||
- Job_BuildImage_Jamstack
|
||||
- Job_BuildImage_GithubActions
|
||||
- Job_BuildImage_VsoFocal
|
||||
- Job_BuildImage_Full
|
||||
- Job_BuildImage_Cli
|
||||
- Job_BuildImage_CliBuster
|
||||
- Job_BuildImage_Buildpack
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=db"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
# PHP integration tests
|
||||
- template: integrationTests/_phpIntegrationJobTemplate.yml
|
||||
parameters:
|
||||
storageAccountUrl: ${{ parameters.storageAccountUrl }}
|
||||
|
||||
- job: Job_DevStorageAccountTest
|
||||
displayName: Test Dev Storage Account
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
parameters:
|
||||
- name: storageAccountUrl
|
||||
type: string
|
||||
default: https://oryxsdksdev.blob.core.windows.net
|
||||
- name: testMappings
|
||||
type: object
|
||||
default:
|
||||
- category: '3.0'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '3.1'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '3.1'
|
||||
buildTag: 'github-actions-debian-stretch'
|
||||
- category: '5.0'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '5.0'
|
||||
buildTag: 'github-actions-debian-stretch'
|
||||
- category: '6.0'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '6.0'
|
||||
buildTag: 'github-actions-debian-stretch'
|
||||
- category: 'dynamic'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: 'dynamic'
|
||||
buildTag: 'github-actions-debian-stretch'
|
||||
|
||||
jobs:
|
||||
- ${{ each mapping in parameters.testMappings }}:
|
||||
- job:
|
||||
displayName: 'Run .NET Core ${{ mapping.category }} Integration Tests using build image tag ${{ mapping.buildTag }}'
|
||||
dependsOn:
|
||||
- Job_BuildImage_Latest
|
||||
- Job_BuildImage_GithubActions
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=dotnetcore-${{ mapping.category }}&build-image=${{ mapping.buildTag }}"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: ../_setReleaseTag.yml
|
||||
- template: ../_buildTemplate.yml
|
|
@ -0,0 +1,49 @@
|
|||
parameters:
|
||||
- name: storageAccountUrl
|
||||
type: string
|
||||
default: https://oryxsdksdev.blob.core.windows.net
|
||||
- name: testMappings
|
||||
type: object
|
||||
default:
|
||||
- category: '1.17'
|
||||
buildTag: 'full-debian-buster'
|
||||
- category: '1.17'
|
||||
buildTag: 'full-debian-bullseye'
|
||||
- category: '1.18'
|
||||
buildTag: 'full-debian-buster'
|
||||
- category: '1.18'
|
||||
buildTag: 'full-debian-bullseye'
|
||||
- category: '1.19'
|
||||
buildTag: 'full-debian-buster'
|
||||
- category: '1.19'
|
||||
buildTag: 'full-debian-bullseye'
|
||||
|
||||
jobs:
|
||||
- ${{ each mapping in parameters.testMappings }}:
|
||||
- job:
|
||||
displayName: 'Run Golang ${{ mapping.category }} Integration Tests using build image tag ${{ mapping.buildTag }}'
|
||||
dependsOn:
|
||||
- Job_BuildImage_Full
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=golang-${{ mapping.category }}&build-image=${{ mapping.buildTag }}"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: ../_setReleaseTag.yml
|
||||
- template: ../_buildTemplate.yml
|
|
@ -0,0 +1,52 @@
|
|||
parameters:
|
||||
- name: storageAccountUrl
|
||||
type: string
|
||||
default: https://oryxsdksdev.blob.core.windows.net
|
||||
- name: testMappings
|
||||
type: object
|
||||
default:
|
||||
- category: '14-stretch-1'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '14-stretch-2'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '14-stretch-3'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '14-stretch-4'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '14-gh-buster'
|
||||
buildTag: 'github-actions-debian-buster'
|
||||
- category: '16'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '18'
|
||||
buildTag: 'github-actions-debian-bullseye'
|
||||
|
||||
jobs:
|
||||
- ${{ each mapping in parameters.testMappings }}:
|
||||
- job:
|
||||
displayName: 'Run Node ${{ mapping.category }} Integration Tests using build image tag ${{ mapping.buildTag }}'
|
||||
dependsOn:
|
||||
- Job_BuildImage_Latest
|
||||
- Job_BuildImage_GithubActions
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=node-${{ mapping.category }}&build-image=${{ mapping.buildTag }}"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: ../_setReleaseTag.yml
|
||||
- template: ../_buildTemplate.yml
|
|
@ -0,0 +1,50 @@
|
|||
parameters:
|
||||
- name: storageAccountUrl
|
||||
type: string
|
||||
default: https://oryxsdksdev.blob.core.windows.net
|
||||
- name: testMappings
|
||||
type: object
|
||||
default:
|
||||
- category: '7.4'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '7.4'
|
||||
buildTag: 'github-actions-debian-buster'
|
||||
- category: '8.0'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '8.0'
|
||||
buildTag: 'github-actions-debian-buster'
|
||||
- category: '8.1'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '8.1'
|
||||
buildTag: 'github-actions-debian-buster'
|
||||
|
||||
jobs:
|
||||
- ${{ each mapping in parameters.testMappings }}:
|
||||
- job:
|
||||
displayName: 'Run PHP ${{ mapping.category }} Integration Tests using build image tag ${{ mapping.buildTag }}'
|
||||
dependsOn:
|
||||
- Job_BuildImage_Latest
|
||||
- Job_BuildImage_GithubActions
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=php-${{ mapping.category }}&build-image=${{ mapping.buildTag }}"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: ../_setReleaseTag.yml
|
||||
- template: ../_buildTemplate.yml
|
|
@ -0,0 +1,54 @@
|
|||
parameters:
|
||||
- name: storageAccountUrl
|
||||
type: string
|
||||
default: https://oryxsdksdev.blob.core.windows.net
|
||||
- name: testMappings
|
||||
type: object
|
||||
default:
|
||||
- category: '3.7'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '3.7'
|
||||
buildTag: 'github-actions-debian-bullseye'
|
||||
- category: '3.8'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '3.8'
|
||||
buildTag: 'github-actions-debian-bullseye'
|
||||
- category: '3.9'
|
||||
buildTag: 'debian-stretch'
|
||||
- category: '3.9'
|
||||
buildTag: 'github-actions-debian-buster'
|
||||
- category: '3.10'
|
||||
buildTag: 'github-actions-debian-bullseye'
|
||||
- category: '3.11'
|
||||
buildTag: 'github-actions-debian-bullseye'
|
||||
|
||||
jobs:
|
||||
- ${{ each mapping in parameters.testMappings }}:
|
||||
- job:
|
||||
displayName: 'Run Python ${{ mapping.category }} Integration Tests using build image tag ${{ mapping.buildTag }}'
|
||||
dependsOn:
|
||||
- Job_BuildImage_Latest
|
||||
- Job_BuildImage_GithubActions
|
||||
- Job_RuntimeImages
|
||||
pool:
|
||||
name: AzurePipelines-EO
|
||||
demands:
|
||||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
timeoutInMinutes: 300
|
||||
steps:
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=BuildBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=BuildRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=TestIntegrationCaseFilter;]category=python-${{ mapping.category }}&build-image=${{ mapping.buildTag }}"
|
||||
echo "##vso[task.setvariable variable=TestIntegration;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: ../_setReleaseTag.yml
|
||||
- template: ../_buildTemplate.yml
|
|
@ -12,9 +12,21 @@ declare imagefilter="oryxdevmcr.azurecr.io/public/oryx"
|
|||
function tagBuildImageForIntegrationTest() {
|
||||
local devbuildImageName="$1"
|
||||
local devbuildImageType="$2"
|
||||
local buildImageFilter="$3"
|
||||
local buildImageTagFilter="$4"
|
||||
local buildDefName="$BUILD_DEFINITIONNAME"
|
||||
local buildNumber="$RELEASE_TAG_NAME"
|
||||
|
||||
|
||||
# Check if a build image filter was provided, and return early if it's not the suffix of the provided build image
|
||||
if [ -n "$buildImageFilter" ] && [[ "$devbuildImageName" != *"$buildImageFilter" ]];then
|
||||
return
|
||||
fi
|
||||
|
||||
# Check if a build tag filter was provided, and return early if it doesn't match the provided build tag
|
||||
if [ -n "$buildImageTagFilter" ] && [ "$devbuildImageType" != "$buildImageTagFilter" ];then
|
||||
return
|
||||
fi
|
||||
|
||||
# Always use specific build number based tag and then use the same tag to create a 'latest' tag and push it
|
||||
if [ -z "$devbuildImageType" ]; then
|
||||
buildImage=$devbuildImageName:$buildDefName.$buildNumber
|
||||
|
@ -37,40 +49,77 @@ function tagBuildImageForIntegrationTest() {
|
|||
|
||||
}
|
||||
|
||||
echo "Build image filter is set"
|
||||
buildImageFilter=""
|
||||
buildImageTagFilter=""
|
||||
platformFilter=""
|
||||
platformVersionFilter=""
|
||||
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "debian-stretch"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "lts-versions-debian-stretch"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "lts-versions-debian-buster"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "azfunc-jamstack-debian-stretch"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "azfunc-jamstack-debian-buster"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "azfunc-jamstack-debian-bullseye"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "github-actions-debian-stretch"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "github-actions-debian-buster"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "github-actions-debian-bullseye"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "vso-ubuntu-focal"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "vso-debian-bullseye"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "full-debian-buster"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "full-debian-bullseye"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/cli" "debian-stretch"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/cli-buster" "debian-buster"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/pack" ""
|
||||
if [ -n "$TESTINTEGRATIONCASEFILTER" ];then
|
||||
IFS='&'
|
||||
read -a splitArr <<< "$TESTINTEGRATIONCASEFILTER"
|
||||
for val in "${splitArr[@]}";
|
||||
do
|
||||
if [[ "$val" == "category="* ]];then
|
||||
categoryPrefix="category="
|
||||
strippedVal=${val#"$categoryPrefix"}
|
||||
IFS='-'
|
||||
read -a tempSplitArr <<< "$strippedVal"
|
||||
len=${#tempSplitArr[@]}
|
||||
platformFilter="${tempSplitArr[0]}"
|
||||
if [[ $len -gt 1 ]];then
|
||||
platformVersionFilter="${tempSplitArr[1]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$val" == "build-image="* ]];then
|
||||
buildImagePrefix="build-image="
|
||||
strippedVal=${val#"$buildImagePrefix"}
|
||||
buildImageFilter="build"
|
||||
buildImageTagFilter="$strippedVal"
|
||||
if [[ "$strippedVal" == "cli-debian-stretch" ]];then
|
||||
buildImageFilter="cli"
|
||||
buildImageTagFilter="debian-stretch"
|
||||
elif [[ "$strippedVal" == "cli-debian-buster" ]];then
|
||||
buildImageFilter="cli-buster"
|
||||
buildImageTagFilter="debian-buster"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Build image filter is set for '$buildImageFilter:$buildImageTagFilter'"
|
||||
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "debian-stretch" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "lts-versions-debian-stretch" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "lts-versions-debian-buster" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "azfunc-jamstack-debian-stretch" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "azfunc-jamstack-debian-buster" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "azfunc-jamstack-debian-bullseye" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "github-actions-debian-stretch" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "github-actions-debian-buster" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "github-actions-debian-bullseye" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "vso-ubuntu-focal" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "vso-debian-bullseye" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "full-debian-buster" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/build" "full-debian-bullseye" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/cli" "debian-stretch" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/cli-buster" "debian-buster" "$buildImageFilter" "$buildImageTagFilter"
|
||||
tagBuildImageForIntegrationTest "$imagefilter/pack" "" "$buildImageFilter" "$buildImageTagFilter"
|
||||
|
||||
|
||||
# Extract language string from string (e.g extract 'python' from 'category=python')
|
||||
# Extract language string from string (e.g extract 'python' from 'category=python', 'debian-stretch' from 'build-image=debian-stretch')
|
||||
if [ -n "$TESTINTEGRATIONCASEFILTER" ];then
|
||||
# For DB tests we want only the build images to be present at the agent machine
|
||||
if [[ "$TESTINTEGRATIONCASEFILTER" != *db* ]];then
|
||||
imagefilter=$(echo $TESTINTEGRATIONCASEFILTER | cut -d'=' -f 2)
|
||||
if [[ "$platformFilter" != "db" ]];then
|
||||
|
||||
# Always convert filter for runtime images to lower case
|
||||
echo "Runtime image filter is set for "$imagefilter
|
||||
echo "Runtime image filter is set for $platformFilter with version $platformVersionFilter"
|
||||
|
||||
while read sourceImage; do
|
||||
# Always use specific build number based tag and then use the same tag
|
||||
# to create a version tag and push it
|
||||
if [[ "$sourceImage" != *:latest ]]; then
|
||||
if [[ "$sourceImage" == *"$imagefilter"* ]]; then
|
||||
if [[ "$sourceImage" == *"$platformFilter:$platformVersionFilter"* ]]; then
|
||||
echo "Pulling the runtime image $sourceImage ..."
|
||||
docker pull "$sourceImage" | sed 's/^/ /'
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче