diff --git a/.github/workflows/run_linux_container_tests.yml b/.github/workflows/run_linux_container_tests.yml index 3c41db5ad..f088724a8 100644 --- a/.github/workflows/run_linux_container_tests.yml +++ b/.github/workflows/run_linux_container_tests.yml @@ -28,8 +28,8 @@ permissions: jobs: - run-linux-container-tests: - name: Run Linux Container Integration Tests + run-amd64-linux-container-tests: + name: Run amd64 Linux Container Integration Tests runs-on: ubuntu-latest env: @@ -46,9 +46,6 @@ jobs: with: egress-policy: audit - - name: Docker Setup QEMU - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -82,5 +79,64 @@ jobs: with: dotnet-version: '9.0.x' - - name: Build & Run Linux Container Integration Tests - run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 + - name: Build & Run amd64 Linux Container Integration Tests + env: + BUILD_ARCH: amd64 + run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Architecture=amd64 + + run-arm64-linux-container-tests: + name: Run arm64 Linux Container Integration Tests + runs-on: ubuntu-24.04-arm + + env: + test_results_path: tests\TestResults + integration_tests_shared_project: ${{ github.workspace }}/tests/Agent/IntegrationTests/Shared + NR_DOTNET_TEST_SAVE_WORKING_DIRECTORY: 1 + # Make this variable true to enable extra data-gathering and logging to help troubleshoot test failures, at the cost of additional time and resources + enhanced_logging: false + + + steps: + - name: Harden Runner + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + with: + egress-policy: audit + + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 + + - name: Download Agent Home Folders (Call) + if: ${{ inputs.external_call }} + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: homefolders + path: src/Agent + + - name: Download Agent Home Folders (Dispatch) + if: ${{ !inputs.external_call }} + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ inputs.run_id }} + name: homefolders + path: ${{ github.workspace }}/src/Agent + repository: ${{ github.repository }} + + - name: Set up secrets + env: + INTEGRATION_TEST_SECRETS: ${{ secrets.TEST_SECRETS }} + run: | + echo $INTEGRATION_TEST_SECRETS | dotnet user-secrets set --project ${{ env.integration_tests_shared_project }} + + - name: Install .NET 9 + uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1 + with: + dotnet-version: '9.0.x' + + - name: Build & Run arm64 Linux Container Integration Tests + env: + BUILD_ARCH: arm64 + run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Architecture=arm64 + \ No newline at end of file diff --git a/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile index 0a8ba7d62..301fbb196 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile @@ -1,13 +1,13 @@ ARG DOTNET_VERSION ARG DISTRO_TAG ARG TARGET_ARCH +ARG BUILD_ARCH FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-${DISTRO_TAG} AS base WORKDIR /app EXPOSE 80 -# build image is always amd64 (to match the runner architecture), even though the target architecture may be arm64 -ARG DOTNET_VERSION -FROM --platform=amd64 mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-${DISTRO_TAG} AS build +# build arch may be different from target arch (i.e., when running locally with QEMU) +FROM --platform=${BUILD_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-${DISTRO_TAG} AS build ARG TARGET_ARCH WORKDIR /src diff --git a/tests/Agent/IntegrationTests/ContainerApplications/CustomBaseContainerBuild/README.md b/tests/Agent/IntegrationTests/ContainerApplications/CustomBaseContainerBuild/README.md index f63438f9e..47da12f99 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/CustomBaseContainerBuild/README.md +++ b/tests/Agent/IntegrationTests/ContainerApplications/CustomBaseContainerBuild/README.md @@ -20,8 +20,8 @@ From a Powershell command prompt in the same folder as this README file: docker buildx build --build-arg DOTNET_VERSION="8.0" -f Dockerfile.AmazonBaseImage --tag dotnetreg.azurecr.io/amazonlinux-aspnet:8.0 --platform linux/amd64,linux/arm64/v8 --push . docker buildx build --build-arg DOTNET_VERSION="9.0" -f Dockerfile.AmazonBaseImage --tag dotnetreg.azurecr.io/amazonlinux-aspnet:9.0 --platform linux/amd64,linux/arm64/v8 --push . -docker buildx build --build-arg DOTNET_VERSION="8.0" -f Dockerfile.FedoraBaseImage --tag fedora-aspnet:8.0 --platform linux/amd64,linux/arm64/v8 -push . -docker buildx build --build-arg DOTNET_VERSION="9.0" -f Dockerfile.FedoraBaseImage --tag fedora-aspnet:9.0 --platform linux/amd64,linux/arm64/v8 -push . +docker buildx build --build-arg DOTNET_VERSION="8.0" -f Dockerfile.FedoraBaseImage --tag dotnetreg.azurecr.io/fedora-aspnet:8.0 --platform linux/amd64,linux/arm64/v8 --push . +docker buildx build --build-arg DOTNET_VERSION="9.0" -f Dockerfile.FedoraBaseImage --tag dotnetreg.azurecr.io/fedora-aspnet:9.0 --platform linux/amd64,linux/arm64/v8 --push . ``` 4. Disable buildx in Docker Desktop diff --git a/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile index 21127fe94..38a5078e3 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile @@ -1,4 +1,5 @@ ARG DISTRO_TAG +ARG BUILD_ARCH FROM --platform=amd64 mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base WORKDIR /app EXPOSE 80 @@ -10,9 +11,8 @@ RUN apt-get update \ && apt-get update \ && apt-get install -y aspnetcore-runtime-8.0 - -# build image is always amd64 (to match the runner architecture), even though the target architecture may be arm64 -FROM --platform=amd64 mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build +# build arch may be different from target arch (i.e., when running locally with QEMU) +FROM --platform=${BUILD_ARCH} mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build RUN apt-get update \ && apt-get install -y wget \ && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ diff --git a/tests/Agent/IntegrationTests/ContainerApplications/MemcachedTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/MemcachedTestApp/Dockerfile index 9bf882836..aec6eda4f 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/MemcachedTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/MemcachedTestApp/Dockerfile @@ -1,4 +1,5 @@ ARG DISTRO_TAG +ARG BUILD_ARCH FROM --platform=amd64 mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base WORKDIR /app EXPOSE 80 @@ -10,9 +11,8 @@ RUN apt-get update \ && apt-get update \ && apt-get install -y aspnetcore-runtime-8.0 - -# build image is always amd64 (to match the runner architecture), even though the target architecture may be arm64 -FROM --platform=amd64 mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build +# build arch may be different from target arch (i.e., when running locally with QEMU) +FROM --platform=${BUILD_ARCH} mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build RUN apt-get update \ && apt-get install -y wget \ && wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ diff --git a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile index 1f60921b5..c1cf13f3b 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile @@ -1,13 +1,13 @@ ARG DOTNET_VERSION ARG DISTRO_TAG ARG TARGET_ARCH +ARG BUILD_ARCH FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-${DISTRO_TAG} AS base WORKDIR /app EXPOSE 80 -# build image is always amd64 (to match the runner architecture), even though the target architecture may be arm64 -ARG DOTNET_VERSION -FROM --platform=amd64 mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-${DISTRO_TAG} AS build +# build arch may be different from target arch (i.e., when running locally with QEMU) +FROM --platform=${BUILD_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-${DISTRO_TAG} AS build ARG TARGET_ARCH WORKDIR /src COPY ["SmokeTestApp/SmokeTestApp.csproj", "SmokeTestApp/"] diff --git a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.amazon b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.amazon index b2f6f15da..9195db71d 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.amazon +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.amazon @@ -1,13 +1,14 @@ ARG DOTNET_VERSION ARG TARGET_ARCH +ARG BUILD_ARCH # Uses a custom-built Amazon Linux image with ASP.NET Core pre-installed, served from a private # container repository under the .NET Team Sandbox Azure subscription FROM --platform=${TARGET_ARCH} dotnetreg.azurecr.io/amazonlinux-aspnet:${DOTNET_VERSION} AS base WORKDIR /app EXPOSE 80 -# build image is always amd64 (to match the runner architecture), even though the target architecture may be arm64 -FROM --platform=amd64 mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build +# build arch may be different from target arch (i.e., when running locally with QEMU) +FROM --platform=${BUILD_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build ARG TARGET_ARCH WORKDIR /src COPY ["SmokeTestApp/SmokeTestApp.csproj", "SmokeTestApp/"] diff --git a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.centos b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.centos index fead07b32..de13cd344 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.centos +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.centos @@ -1,11 +1,12 @@ ARG DOTNET_VERSION ARG TARGET_ARCH +ARG BUILD_ARCH FROM --platform=${TARGET_ARCH} quay.io/centos/centos:stream9 AS base WORKDIR /app EXPOSE 80 -# build image is always amd64 (to match the runner architecture), even though the target architecture may be arm64 -FROM --platform=amd64 mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build +# build arch may be different from target arch (i.e., when running locally with QEMU) +FROM --platform=${BUILD_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build ARG TARGET_ARCH WORKDIR /src COPY ["SmokeTestApp/SmokeTestApp.csproj", "SmokeTestApp/"] @@ -40,4 +41,4 @@ NEW_RELIC_LOG_DIRECTORY=/app/logs WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "SmokeTestApp.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "SmokeTestApp.dll"] diff --git a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora index 26fe0e95b..0f90b7a65 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora @@ -1,13 +1,13 @@ ARG DOTNET_VERSION -ARG TARGET_ARCH +ARG BUILD_ARCH # Uses a custom-built Fedora image with ASP.NET Core pre-installed, served from a private # container repository under the .NET Team Sandbox Azure subscription -FROM --platform=${TARGET_ARCH} dotnetreg.azurecr.io/fedora-aspnet:${DOTNET_VERSION} AS base +FROM dotnetreg.azurecr.io/fedora-aspnet:${DOTNET_VERSION} AS base WORKDIR /app EXPOSE 80 -# build image is always amd64 (to match the runner architecture), even though the target architecture may be arm64 -FROM --platform=amd64 mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build +# build arch may be different from target arch (i.e., when running locally with QEMU) +FROM --platform=${BUILD_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build ARG TARGET_ARCH WORKDIR /src COPY ["SmokeTestApp/SmokeTestApp.csproj", "SmokeTestApp/"] diff --git a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-awssdk.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-awssdk.yml index a3873cf8d..c13a20a7f 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-awssdk.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-awssdk.yml @@ -3,7 +3,8 @@ # AGENT_PATH host path to the Agent linux home folder - will map to /usr/local/newrelic-dotnet-agent in the container # LOG_PATH host path for Agent logfile output - will map to /app/logs in the container # DISTRO_TAG distro tag for build, not including the architecture suffix - possible values 8.0-bookworm-slim, 8.0-alpine, 8.0-jammy -# TARGET_ARCH the target architecture for the build and run -- either amd64 or arm64 +# TARGET_ARCH the target architecture for the run -- either amd64 or arm64 +# BUILD_ARCH the build architecture-- either amd64 or arm64 # PORT external port for the smoketest API # CONTAINER_NAME The name for the container # PLATFORM The platform that the service runs on -- linux/amd64 or linux/arm64/v8 @@ -54,6 +55,7 @@ services: args: DISTRO_TAG: ${DISTRO_TAG} TARGET_ARCH: ${TARGET_ARCH} + BUILD_ARCH: ${BUILD_ARCH} NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY} NEW_RELIC_APP_NAME: ${NEW_RELIC_APP_NAME} NEW_RELIC_HOST: ${NEW_RELIC_HOST} diff --git a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml index 7a35fa56f..8aed13d20 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml @@ -3,7 +3,8 @@ # AGENT_PATH host path to the Agent linux home folder - will map to /usr/local/newrelic-dotnet-agent in the container # LOG_PATH host path for Agent logfile output - will map to /app/logs in the container # DISTRO_TAG distro tag for build, not including the architecture suffix - possible values 8.0-bookworm-slim, 8.0-alpine, 8.0-jammy -# TARGET_ARCH the target architecture for the build and run -- either amd64 or arm64 +# TARGET_ARCH the target architecture for the run -- either amd64 or arm64 +# BUILD_ARCH the build architecture -- either amd64 or arm64 # PORT external port for the smoketest API # CONTAINER_NAME The name for the container # PLATFORM The platform that the service runs on -- linux/amd64 or linux/arm64/v8 @@ -32,6 +33,7 @@ services: args: DISTRO_TAG: ${DISTRO_TAG} TARGET_ARCH: ${TARGET_ARCH} + BUILD_ARCH: ${BUILD_ARCH} NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY} NEW_RELIC_APP_NAME: ${NEW_RELIC_APP_NAME} NEW_RELIC_HOST: ${NEW_RELIC_HOST} diff --git a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-memcached.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-memcached.yml index bcabc6b81..6028c61af 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-memcached.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-memcached.yml @@ -3,7 +3,8 @@ # AGENT_PATH host path to the Agent linux home folder - will map to /usr/local/newrelic-dotnet-agent in the container # LOG_PATH host path for Agent logfile output - will map to /app/logs in the container # DISTRO_TAG distro tag for build, not including the architecture suffix - possible values 8.0-bookworm-slim, 8.0-alpine, 8.0-jammy -# TARGET_ARCH the target architecture for the build and run -- either amd64 or arm64 +# TARGET_ARCH the target architecture for the run -- either amd64 or arm64 +# BUILD_ARCH the build architecture -- either amd64 or arm64 # PORT external port for the smoketest API # CONTAINER_NAME The name for the container # PLATFORM The platform that the service runs on -- linux/amd64 or linux/arm64/v8 @@ -32,6 +33,7 @@ services: args: DISTRO_TAG: ${DISTRO_TAG} TARGET_ARCH: ${TARGET_ARCH} + BUILD_ARCH: ${BUILD_ARCH} NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY} NEW_RELIC_APP_NAME: ${NEW_RELIC_APP_NAME} NEW_RELIC_HOST: ${NEW_RELIC_HOST} diff --git a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml index 336f4b18d..9944a4fed 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml @@ -3,7 +3,8 @@ # AGENT_PATH host path to the Agent linux home folder - will map to /usr/local/newrelic-dotnet-agent in the container # LOG_PATH host path for Agent logfile output - will map to /app/logs in the container # DISTRO_TAG distro tag for build, not including the architecture suffix - possible values 9.0-bookworm-slim, 9.0-alpine, 9.0-noble -# TARGET_ARCH the target architecture for the build and run -- either amd64 or arm64 +# TARGET_ARCH the target architecture for the run -- either amd64 or arm64 +# BUILD_ARCH the build architecture -- either amd64 or arm64 # PORT external port for the smoketest API # CONTAINER_NAME The name for the container # PLATFORM The platform that the service runs on -- linux/amd64 or linux/arm64/v8 @@ -30,6 +31,7 @@ services: args: DISTRO_TAG: ${DISTRO_TAG} TARGET_ARCH: ${TARGET_ARCH} + BUILD_ARCH: ${BUILD_ARCH} NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY} NEW_RELIC_APP_NAME: ${NEW_RELIC_APP_NAME} NEW_RELIC_HOST: ${NEW_RELIC_HOST} diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Applications/ContainerApplication.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Applications/ContainerApplication.cs index d0d5b89ad..d2dc13add 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Applications/ContainerApplication.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Applications/ContainerApplication.cs @@ -139,6 +139,12 @@ public override void Start(string commandLineArguments, Dictionary { private readonly AwsSdkContainerDynamoDBTestFixture _fixture; diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkMultiServiceTest.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkMultiServiceTest.cs index c97a4dfe3..dd03cd405 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkMultiServiceTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkMultiServiceTest.cs @@ -10,6 +10,7 @@ namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk; +[Trait("Architecture", "amd64")] public class AwsSdkMultiServiceTest : NewRelicIntegrationTest { private readonly AwsSdkContainerMultiServiceTestFixture _fixture; diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkSQSTest.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkSQSTest.cs index 8c73ba3bf..ff5d3a853 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkSQSTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkSQSTest.cs @@ -9,9 +9,11 @@ using NewRelic.Testing.Assertions; using Xunit; using Xunit.Abstractions; +using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk; +[Trait("Architecture", "amd64")] public abstract class AwsSdkSQSTestBase : NewRelicIntegrationTest { private readonly AwsSdkContainerSQSTestFixture _fixture; diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/InfiniteTracingContainerTests.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/InfiniteTracingContainerTests.cs index 309e2f160..12bc4edf6 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/InfiniteTracingContainerTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/InfiniteTracingContainerTests.cs @@ -77,34 +77,46 @@ public void Test() // only testing on a subset of linux distros to keep total test runtime under control. Additional distros can be uncommented below if needed. +[Trait("Architecture", "amd64")] public class DebianX64InfiniteTracingContainerTest(DebianX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); +//[Trait("Architecture", "amd64")] //public class UbuntuX64InfiniteTracingContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); +[Trait("Architecture", "amd64")] public class AlpineX64InfiniteTracingContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); +[Trait("Architecture", "arm64")] public class DebianArm64InfiniteTracingContainerTest(DebianArm64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); +//[Trait("Architecture", "arm64")] //public class UbuntuArm64InfiniteTracingContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); +//[Trait("Architecture", "amd64")] //public class CentosX64InfiniteTracingContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); +//[Trait("Architecture", "arm64")] //public class CentosArm64InfiniteTracingContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); +[Trait("Architecture", "amd64")] public class AmazonX64InfiniteTracingContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); +[Trait("Architecture", "arm64")] public class AmazonArm64InfiniteTracingContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); + +//[Trait("Architecture", "amd64")] //public class FedoraX64InfiniteTracingContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); +//[Trait("Architecture", "arm64")] //public class FedoraArm64InfiniteTracingContainerTest(FedoraArm64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs index f7d6ba971..a56108e9f 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs @@ -122,6 +122,7 @@ internal static string GenerateTopic() } } +[Trait("Architecture", "amd64")] public class KafkaDotNet8Test : LinuxKafkaTest { public KafkaDotNet8Test(KafkaDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -129,6 +130,7 @@ public KafkaDotNet8Test(KafkaDotNet8TestFixture fixture, ITestOutputHelper outpu } } +[Trait("Architecture", "amd64")] public class KafkaDotNet9Test : LinuxKafkaTest { public KafkaDotNet9Test(KafkaDotNet9TestFixture fixture, ITestOutputHelper output) : base(fixture, output) diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxContainerTests.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxContainerTests.cs index 04a6952b7..a51700725 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxContainerTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxContainerTests.cs @@ -47,6 +47,7 @@ public void Test() } } +[Trait("Architecture", "amd64")] public class DebianX64ContainerTest : LinuxContainerTest { public DebianX64ContainerTest(DebianX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -54,12 +55,15 @@ public DebianX64ContainerTest(DebianX64ContainerTestFixture fixture, ITestOutput } } +[Trait("Architecture", "amd64")] public class UbuntuX64ContainerTest : LinuxContainerTest { public UbuntuX64ContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) { } } + +[Trait("Architecture", "amd64")] public class AlpineX64ContainerTest : LinuxContainerTest { public AlpineX64ContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -67,6 +71,7 @@ public AlpineX64ContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutput } } +[Trait("Architecture", "arm64")] public class DebianArm64ContainerTest : LinuxContainerTest { public DebianArm64ContainerTest(DebianArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -74,6 +79,7 @@ public DebianArm64ContainerTest(DebianArm64ContainerTestFixture fixture, ITestOu } } +[Trait("Architecture", "arm64")] public class UbuntuArm64ContainerTest : LinuxContainerTest { public UbuntuArm64ContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -81,6 +87,7 @@ public UbuntuArm64ContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOu } } +[Trait("Architecture", "amd64")] public class CentosX64ContainerTest : LinuxContainerTest { public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -89,6 +96,7 @@ public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutput } // temporarily disabled until QEMU issue is resolved +//[Trait("Architecture", "arm64")] //public class CentosArm64ContainerTest : LinuxContainerTest //{ // public CentosArm64ContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -96,6 +104,7 @@ public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutput // } //} +[Trait("Architecture", "amd64")] public class AmazonX64ContainerTest : LinuxContainerTest { public AmazonX64ContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -103,12 +112,15 @@ public AmazonX64ContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutput } } +[Trait("Architecture", "arm64")] public class AmazonArm64ContainerTest : LinuxContainerTest { public AmazonArm64ContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) { } } + +[Trait("Architecture", "amd64")] public class FedoraX64ContainerTest : LinuxContainerTest { public FedoraX64ContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -116,6 +128,7 @@ public FedoraX64ContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutput } } +[Trait("Architecture", "arm64")] public class FedoraArm64ContainerTest : LinuxContainerTest { public FedoraArm64ContainerTest(FedoraArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxUnicodeLogFileTest.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxUnicodeLogFileTest.cs index a1c991785..fc2d79048 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxUnicodeLogFileTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxUnicodeLogFileTest.cs @@ -16,6 +16,7 @@ namespace NewRelic.Agent.ContainerIntegrationTests.Tests /// would be created by the test application, with the profiler change, the test transaction should be /// created successfully. /// + [Trait("Architecture", "amd64")] public class LinuxUnicodeLogFileTest : NewRelicIntegrationTest { private readonly LinuxUnicodeLogFileTestFixture _fixture; diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/MemcachedTests.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/MemcachedTests.cs index d36d99bfc..9d58a1c31 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/MemcachedTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/MemcachedTests.cs @@ -128,12 +128,15 @@ public void Test() } } + [Trait("Architecture", "amd64")] public class MemcachedDotNet8Test : LinuxMemcachedTest { public MemcachedDotNet8Test(MemcachedDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output) { } } + + [Trait("Architecture", "amd64")] public class MemcachedDotNet9Test : LinuxMemcachedTest { public MemcachedDotNet9Test(MemcachedDotNet9TestFixture fixture, ITestOutputHelper output) : base(fixture, output)