From 01ac42562f2dc3e403ca7e86e35c564bc7edd558 Mon Sep 17 00:00:00 2001 From: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Date: Wed, 22 Jan 2025 12:58:57 -0600 Subject: [PATCH 1/9] test: Add x64 and arm64 category trait to integration tests and update CI workflow to run arm64 tests on an arm runner --- .../workflows/run_linux_container_tests.yml | 64 +++++++++++++++++-- .../Tests/AwsSdk/AwsSdkDynamoDBTest.cs | 3 + .../Tests/AwsSdk/AwsSdkMultiServiceTest.cs | 3 + .../Tests/AwsSdk/AwsSdkSQSTest.cs | 2 + .../Tests/InfiniteTracingContainerTests.cs | 14 ++++ .../Tests/KafkaTests.cs | 4 ++ .../Tests/LinuxContainerTests.cs | 15 +++++ .../Tests/LinuxUnicodeLogFileTest.cs | 3 + .../Tests/MemcachedTests.cs | 5 ++ 9 files changed, 109 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_linux_container_tests.yml b/.github/workflows/run_linux_container_tests.yml index 3c41db5add..d521a1a669 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-x64-linux-container-tests: + name: Run x64 Linux Container Integration Tests runs-on: ubuntu-latest env: @@ -82,5 +82,61 @@ 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 x64 Linux Container Integration Tests + run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 -filter Category=x64 + + 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 + run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 -filter Category=arm64 + + \ No newline at end of file diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs index 4b40aec78f..e0f4f352c7 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs @@ -6,11 +6,14 @@ using System.Linq; using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; +using NUnit.Framework; using Xunit; using Xunit.Abstractions; +using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk; +[Trait("Category", "x64")] public class AwsSdkDynamoDBTest : NewRelicIntegrationTest { 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 c97a4dfe3e..ed6948b755 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkMultiServiceTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkMultiServiceTest.cs @@ -5,11 +5,14 @@ using System.Linq; using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; +using NUnit.Framework; using Xunit; using Xunit.Abstractions; +using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk; +[Trait("Category", "x64")] 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 8c73ba3bfe..c345ac833f 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("Category", "x64")] 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 309e2f1600..85f3e43460 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/InfiniteTracingContainerTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/InfiniteTracingContainerTests.cs @@ -6,8 +6,10 @@ using System.Linq; using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; +using NUnit.Framework; using Xunit; using Xunit.Abstractions; +using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests; @@ -77,34 +79,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("Category", "x64")] public class DebianX64InfiniteTracingContainerTest(DebianX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); +//[Trait("Category", "x64")] //public class UbuntuX64InfiniteTracingContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); +[Trait("Category", "x64")] public class AlpineX64InfiniteTracingContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); +[Trait("Category", "arm64")] public class DebianArm64InfiniteTracingContainerTest(DebianArm64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); +//[Trait("Category", "arm64")] //public class UbuntuArm64InfiniteTracingContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); +//[Trait("Category", "x64")] //public class CentosX64InfiniteTracingContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); +//[Trait("Category", "arm64")] //public class CentosArm64InfiniteTracingContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); +[Trait("Category", "x64")] public class AmazonX64InfiniteTracingContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); +[Trait("Category", "arm64")] public class AmazonArm64InfiniteTracingContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); + +//[Trait("Category", "x64")] //public class FedoraX64InfiniteTracingContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); +//[Trait("Category", "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 f7d6ba9713..9a37a78209 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs @@ -9,8 +9,10 @@ using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; using NewRelic.Testing.Assertions; +using NUnit.Framework; using Xunit; using Xunit.Abstractions; +using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests; @@ -122,6 +124,7 @@ internal static string GenerateTopic() } } +[Trait("Category", "x64")] public class KafkaDotNet8Test : LinuxKafkaTest { public KafkaDotNet8Test(KafkaDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -129,6 +132,7 @@ public KafkaDotNet8Test(KafkaDotNet8TestFixture fixture, ITestOutputHelper outpu } } +[Trait("Category", "x64")] 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 04a6952b71..d32589e2c9 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxContainerTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxContainerTests.cs @@ -4,8 +4,10 @@ using System; using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; +using NUnit.Framework; using Xunit; using Xunit.Abstractions; +using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests; @@ -47,6 +49,7 @@ public void Test() } } +[Trait("Category", "x64")] public class DebianX64ContainerTest : LinuxContainerTest { public DebianX64ContainerTest(DebianX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -54,12 +57,15 @@ public DebianX64ContainerTest(DebianX64ContainerTestFixture fixture, ITestOutput } } +[Trait("Category", "x64")] public class UbuntuX64ContainerTest : LinuxContainerTest { public UbuntuX64ContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) { } } + +[Trait("Category", "x64")] public class AlpineX64ContainerTest : LinuxContainerTest { public AlpineX64ContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -67,6 +73,7 @@ public AlpineX64ContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutput } } +[Trait("Category", "arm64")] public class DebianArm64ContainerTest : LinuxContainerTest { public DebianArm64ContainerTest(DebianArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -74,6 +81,7 @@ public DebianArm64ContainerTest(DebianArm64ContainerTestFixture fixture, ITestOu } } +[Trait("Category", "arm64")] public class UbuntuArm64ContainerTest : LinuxContainerTest { public UbuntuArm64ContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -81,6 +89,7 @@ public UbuntuArm64ContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOu } } +[Trait("Category", "x64")] public class CentosX64ContainerTest : LinuxContainerTest { public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -89,6 +98,7 @@ public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutput } // temporarily disabled until QEMU issue is resolved +//[Trait("Category", "arm64")] //public class CentosArm64ContainerTest : LinuxContainerTest //{ // public CentosArm64ContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -96,6 +106,7 @@ public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutput // } //} +[Trait("Category", "x64")] public class AmazonX64ContainerTest : LinuxContainerTest { public AmazonX64ContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -103,12 +114,15 @@ public AmazonX64ContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutput } } +[Trait("Category", "arm64")] public class AmazonArm64ContainerTest : LinuxContainerTest { public AmazonArm64ContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) { } } + +[Trait("Category", "x64")] public class FedoraX64ContainerTest : LinuxContainerTest { public FedoraX64ContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -116,6 +130,7 @@ public FedoraX64ContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutput } } +[Trait("Category", "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 a1c991785f..e3dc6ad1ed 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxUnicodeLogFileTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxUnicodeLogFileTest.cs @@ -4,8 +4,10 @@ using System; using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; +using NUnit.Framework; using Xunit; using Xunit.Abstractions; +using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests { @@ -16,6 +18,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("Category", "x64")] 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 d36d99bfc8..df5a7dd8aa 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/MemcachedTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/MemcachedTests.cs @@ -7,8 +7,10 @@ using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; using NewRelic.Testing.Assertions; +using NUnit.Framework; using Xunit; using Xunit.Abstractions; +using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests { @@ -128,12 +130,15 @@ public void Test() } } + [Trait("Category", "x64")] public class MemcachedDotNet8Test : LinuxMemcachedTest { public MemcachedDotNet8Test(MemcachedDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output) { } } + + [Trait("Category", "x64")] public class MemcachedDotNet9Test : LinuxMemcachedTest { public MemcachedDotNet9Test(MemcachedDotNet9TestFixture fixture, ITestOutputHelper output) : base(fixture, output) From 24ca2b5452f79a8db36138cf858c65c54e6432e6 Mon Sep 17 00:00:00 2001 From: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Date: Wed, 22 Jan 2025 13:22:58 -0600 Subject: [PATCH 2/9] oops --- .github/workflows/run_linux_container_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_linux_container_tests.yml b/.github/workflows/run_linux_container_tests.yml index d521a1a669..72f79f805c 100644 --- a/.github/workflows/run_linux_container_tests.yml +++ b/.github/workflows/run_linux_container_tests.yml @@ -83,7 +83,7 @@ jobs: dotnet-version: '9.0.x' - name: Build & Run x64 Linux Container Integration Tests - run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 -filter Category=x64 + run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Category=x64 run-arm64-linux-container-tests: name: Run arm64 Linux Container Integration Tests @@ -137,6 +137,6 @@ jobs: dotnet-version: '9.0.x' - name: Build & Run arm64 Linux Container Integration Tests - run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 -filter Category=arm64 + run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Category=arm64 \ No newline at end of file From 7bdef62de520d7508587f56c5975bc72dae23e30 Mon Sep 17 00:00:00 2001 From: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Date: Wed, 22 Jan 2025 13:54:16 -0600 Subject: [PATCH 3/9] Update target arch for dockerfiles --- .../ContainerApplications/AwsSdkTestApp/Dockerfile | 2 +- .../ContainerApplications/KafkaTestApp/Dockerfile | 4 ++-- .../ContainerApplications/MemcachedTestApp/Dockerfile | 4 ++-- .../ContainerApplications/SmokeTestApp/Dockerfile | 3 +-- .../ContainerApplications/SmokeTestApp/Dockerfile.amazon | 2 +- .../ContainerApplications/SmokeTestApp/Dockerfile.centos | 2 +- .../ContainerApplications/SmokeTestApp/Dockerfile.fedora | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile index 0a8ba7d629..af8f3168df 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile @@ -7,7 +7,7 @@ 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 +FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-${DISTRO_TAG} AS build ARG TARGET_ARCH WORKDIR /src diff --git a/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile index 21127fe946..bc0d2509fd 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile @@ -1,5 +1,5 @@ ARG DISTRO_TAG -FROM --platform=amd64 mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base +FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base WORKDIR /app EXPOSE 80 RUN apt-get update \ @@ -12,7 +12,7 @@ RUN apt-get update \ # 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 +FROM --platform=${TARGET_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 9bf8828364..df2aac7bbe 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/MemcachedTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/MemcachedTestApp/Dockerfile @@ -1,5 +1,5 @@ ARG DISTRO_TAG -FROM --platform=amd64 mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base +FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base WORKDIR /app EXPOSE 80 RUN apt-get update \ @@ -12,7 +12,7 @@ RUN apt-get update \ # 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 +FROM --platform=${TARGET_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 1f60921b5f..6e75592dbc 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile @@ -5,9 +5,8 @@ FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION} 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 +FROM --platform=${TARGET_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 b2f6f15da8..8d2e84a16c 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.amazon +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.amazon @@ -7,7 +7,7 @@ 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 +FROM --platform=${TARGET_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 fead07b320..ace72a0ce0 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.centos +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.centos @@ -5,7 +5,7 @@ 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 +FROM --platform=${TARGET_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.fedora b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora index 26fe0e95b5..b1f45eca00 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora @@ -7,7 +7,7 @@ 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 +FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build ARG TARGET_ARCH WORKDIR /src COPY ["SmokeTestApp/SmokeTestApp.csproj", "SmokeTestApp/"] From eb012a47a95313ff7572ed713251fd5c9f962bba Mon Sep 17 00:00:00 2001 From: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Date: Wed, 22 Jan 2025 14:14:31 -0600 Subject: [PATCH 4/9] remove target_arch specifiers in base image tags --- .../ContainerApplications/AwsSdkTestApp/Dockerfile | 6 ++---- .../ContainerApplications/KafkaTestApp/Dockerfile | 6 ++---- .../ContainerApplications/MemcachedTestApp/Dockerfile | 6 ++---- .../ContainerApplications/SmokeTestApp/Dockerfile | 5 ++--- .../ContainerApplications/SmokeTestApp/Dockerfile.amazon | 6 ++---- .../ContainerApplications/SmokeTestApp/Dockerfile.centos | 6 ++---- .../ContainerApplications/SmokeTestApp/Dockerfile.fedora | 6 ++---- 7 files changed, 14 insertions(+), 27 deletions(-) diff --git a/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile index af8f3168df..f62526ebe5 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile @@ -1,13 +1,11 @@ ARG DOTNET_VERSION ARG DISTRO_TAG -ARG TARGET_ARCH -FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-${DISTRO_TAG} AS base +FROM 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=${TARGET_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-${DISTRO_TAG} AS build +FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-${DISTRO_TAG} AS build ARG TARGET_ARCH WORKDIR /src diff --git a/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile index bc0d2509fd..4f110c8608 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile @@ -1,5 +1,5 @@ ARG DISTRO_TAG -FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base WORKDIR /app EXPOSE 80 RUN apt-get update \ @@ -10,9 +10,7 @@ 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=${TARGET_ARCH} mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build +FROM 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 df2aac7bbe..1af405c679 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/MemcachedTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/MemcachedTestApp/Dockerfile @@ -1,5 +1,5 @@ ARG DISTRO_TAG -FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base WORKDIR /app EXPOSE 80 RUN apt-get update \ @@ -10,9 +10,7 @@ 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=${TARGET_ARCH} mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS build +FROM 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 6e75592dbc..4e6f9852b2 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile @@ -1,12 +1,11 @@ ARG DOTNET_VERSION ARG DISTRO_TAG -ARG TARGET_ARCH -FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-${DISTRO_TAG} AS base +FROM mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-${DISTRO_TAG} AS base WORKDIR /app EXPOSE 80 ARG DOTNET_VERSION -FROM --platform=${TARGET_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-${DISTRO_TAG} AS build +FROM 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 8d2e84a16c..b141be734f 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.amazon +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.amazon @@ -1,13 +1,11 @@ ARG DOTNET_VERSION -ARG TARGET_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 +FROM 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=${TARGET_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build +FROM 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 ace72a0ce0..6a9b6534ad 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.centos +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.centos @@ -1,11 +1,9 @@ ARG DOTNET_VERSION -ARG TARGET_ARCH -FROM --platform=${TARGET_ARCH} quay.io/centos/centos:stream9 AS base +FROM 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=${TARGET_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build +FROM 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.fedora b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora index b1f45eca00..f3e254748d 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora @@ -1,13 +1,11 @@ ARG DOTNET_VERSION -ARG TARGET_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=${TARGET_ARCH} mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build +FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build ARG TARGET_ARCH WORKDIR /src COPY ["SmokeTestApp/SmokeTestApp.csproj", "SmokeTestApp/"] From 20631fcccea58bbf0100ecef15ce60eb4625704a Mon Sep 17 00:00:00 2001 From: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Date: Wed, 22 Jan 2025 15:24:05 -0600 Subject: [PATCH 5/9] Add BUILD_ARCH, remove qemu from x64 --- .github/workflows/run_linux_container_tests.yml | 7 ++++--- .../ContainerApplications/AwsSdkTestApp/Dockerfile | 8 +++++--- .../ContainerApplications/KafkaTestApp/Dockerfile | 6 ++++-- .../ContainerApplications/MemcachedTestApp/Dockerfile | 6 ++++-- .../ContainerApplications/SmokeTestApp/Dockerfile | 8 +++++--- .../ContainerApplications/SmokeTestApp/Dockerfile.amazon | 7 +++++-- .../ContainerApplications/SmokeTestApp/Dockerfile.centos | 9 ++++++--- .../ContainerApplications/SmokeTestApp/Dockerfile.fedora | 4 +++- .../ContainerApplications/docker-compose-awssdk.yml | 2 ++ .../ContainerApplications/docker-compose-kafka.yml | 2 ++ .../ContainerApplications/docker-compose-memcached.yml | 2 ++ .../ContainerApplications/docker-compose.yml | 2 ++ .../Applications/ContainerApplication.cs | 7 +++++++ 13 files changed, 51 insertions(+), 19 deletions(-) diff --git a/.github/workflows/run_linux_container_tests.yml b/.github/workflows/run_linux_container_tests.yml index 72f79f805c..3b4d631a4f 100644 --- a/.github/workflows/run_linux_container_tests.yml +++ b/.github/workflows/run_linux_container_tests.yml @@ -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: @@ -83,6 +80,8 @@ jobs: dotnet-version: '9.0.x' - name: Build & Run x64 Linux Container Integration Tests + env: + BUILD_ENV: x64 run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Category=x64 run-arm64-linux-container-tests: @@ -137,6 +136,8 @@ jobs: dotnet-version: '9.0.x' - name: Build & Run arm64 Linux Container Integration Tests + env: + BUILD_ENV: arm64 run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Category=arm64 \ No newline at end of file diff --git a/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile index f62526ebe5..301fbb196d 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/AwsSdkTestApp/Dockerfile @@ -1,11 +1,13 @@ ARG DOTNET_VERSION ARG DISTRO_TAG -FROM mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-${DISTRO_TAG} AS base +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 -ARG DOTNET_VERSION -FROM 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/KafkaTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile index 4f110c8608..38a5078e34 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile @@ -1,5 +1,6 @@ ARG DISTRO_TAG -FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base +ARG BUILD_ARCH +FROM --platform=amd64 mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base WORKDIR /app EXPOSE 80 RUN apt-get update \ @@ -10,7 +11,8 @@ RUN apt-get update \ && apt-get update \ && apt-get install -y aspnetcore-runtime-8.0 -FROM 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 1af405c679..aec6eda4ff 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/MemcachedTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/MemcachedTestApp/Dockerfile @@ -1,5 +1,6 @@ ARG DISTRO_TAG -FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base +ARG BUILD_ARCH +FROM --platform=amd64 mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS base WORKDIR /app EXPOSE 80 RUN apt-get update \ @@ -10,7 +11,8 @@ RUN apt-get update \ && apt-get update \ && apt-get install -y aspnetcore-runtime-8.0 -FROM 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 4e6f9852b2..c1cf13f3bb 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile @@ -1,11 +1,13 @@ ARG DOTNET_VERSION ARG DISTRO_TAG -FROM mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-${DISTRO_TAG} AS base +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 -ARG DOTNET_VERSION -FROM 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 b141be734f..9195db71d8 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.amazon +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.amazon @@ -1,11 +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 dotnetreg.azurecr.io/amazonlinux-aspnet:${DOTNET_VERSION} AS base +FROM --platform=${TARGET_ARCH} dotnetreg.azurecr.io/amazonlinux-aspnet:${DOTNET_VERSION} AS base WORKDIR /app EXPOSE 80 -FROM 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 6a9b6534ad..de13cd3443 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.centos +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.centos @@ -1,9 +1,12 @@ ARG DOTNET_VERSION -FROM quay.io/centos/centos:stream9 AS base +ARG TARGET_ARCH +ARG BUILD_ARCH +FROM --platform=${TARGET_ARCH} quay.io/centos/centos:stream9 AS base WORKDIR /app EXPOSE 80 -FROM 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/"] @@ -38,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 f3e254748d..0f90b7a657 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/Dockerfile.fedora @@ -1,11 +1,13 @@ ARG DOTNET_VERSION +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 dotnetreg.azurecr.io/fedora-aspnet:${DOTNET_VERSION} AS base WORKDIR /app EXPOSE 80 -FROM 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 a3873cf8d0..6911e45813 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-awssdk.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-awssdk.yml @@ -4,6 +4,7 @@ # 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 +# BUILD_ARCH the build architecture for the build and run -- 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 7a35fa56fe..a220f3d629 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml @@ -4,6 +4,7 @@ # 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 +# BUILD_ARCH the build architecture for the build and run -- 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 bcabc6b818..b4a119dada 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-memcached.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-memcached.yml @@ -4,6 +4,7 @@ # 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 +# BUILD_ARCH the build architecture for the build and run -- 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 336f4b18db..51f1787c32 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml @@ -4,6 +4,7 @@ # 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 +# BUILD_ARCH the build architecture for the build and run -- 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 d0d5b89ad5..e9f1272ed9 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Applications/ContainerApplication.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Applications/ContainerApplication.cs @@ -21,6 +21,7 @@ public class ContainerApplication : RemoteApplication private readonly string _dotnetVersion; private readonly string _distroTag; private readonly string _targetArch; + private readonly string _buildArch; private readonly string _agentArch; private readonly string _containerPlatform; @@ -139,6 +140,12 @@ public override void Start(string commandLineArguments, Dictionary Date: Wed, 22 Jan 2025 15:27:20 -0600 Subject: [PATCH 6/9] Oops again. --- .../Applications/ContainerApplication.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Applications/ContainerApplication.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Applications/ContainerApplication.cs index e9f1272ed9..6fbfce55b8 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Applications/ContainerApplication.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Applications/ContainerApplication.cs @@ -21,7 +21,6 @@ public class ContainerApplication : RemoteApplication private readonly string _dotnetVersion; private readonly string _distroTag; private readonly string _targetArch; - private readonly string _buildArch; private readonly string _agentArch; private readonly string _containerPlatform; From b4483c10aa6bffacf840aaaa7ba11a985d635ebd Mon Sep 17 00:00:00 2001 From: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Date: Wed, 22 Jan 2025 15:32:44 -0600 Subject: [PATCH 7/9] Grr --- .github/workflows/run_linux_container_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_linux_container_tests.yml b/.github/workflows/run_linux_container_tests.yml index 3b4d631a4f..f6e27d681d 100644 --- a/.github/workflows/run_linux_container_tests.yml +++ b/.github/workflows/run_linux_container_tests.yml @@ -81,7 +81,7 @@ jobs: - name: Build & Run x64 Linux Container Integration Tests env: - BUILD_ENV: x64 + BUILD_ARCH: x64 run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Category=x64 run-arm64-linux-container-tests: @@ -137,7 +137,7 @@ jobs: - name: Build & Run arm64 Linux Container Integration Tests env: - BUILD_ENV: arm64 + BUILD_ARCH: arm64 run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Category=arm64 \ No newline at end of file From 26940d7ca8e591b0597a45d1a56cf7bac35a302c Mon Sep 17 00:00:00 2001 From: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Date: Wed, 22 Jan 2025 15:35:48 -0600 Subject: [PATCH 8/9] consistently use amd64 --- .github/workflows/run_linux_container_tests.yml | 10 +++++----- .../Tests/AwsSdk/AwsSdkDynamoDBTest.cs | 2 +- .../Tests/AwsSdk/AwsSdkMultiServiceTest.cs | 2 +- .../Tests/AwsSdk/AwsSdkSQSTest.cs | 2 +- .../Tests/InfiniteTracingContainerTests.cs | 12 ++++++------ .../ContainerIntegrationTests/Tests/KafkaTests.cs | 4 ++-- .../Tests/LinuxContainerTests.cs | 12 ++++++------ .../Tests/LinuxUnicodeLogFileTest.cs | 2 +- .../Tests/MemcachedTests.cs | 4 ++-- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/run_linux_container_tests.yml b/.github/workflows/run_linux_container_tests.yml index f6e27d681d..7adaba8cbf 100644 --- a/.github/workflows/run_linux_container_tests.yml +++ b/.github/workflows/run_linux_container_tests.yml @@ -28,8 +28,8 @@ permissions: jobs: - run-x64-linux-container-tests: - name: Run x64 Linux Container Integration Tests + run-amd64-linux-container-tests: + name: Run amd64 Linux Container Integration Tests runs-on: ubuntu-latest env: @@ -79,10 +79,10 @@ jobs: with: dotnet-version: '9.0.x' - - name: Build & Run x64 Linux Container Integration Tests + - name: Build & Run amd64 Linux Container Integration Tests env: - BUILD_ARCH: x64 - run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Category=x64 + BUILD_ARCH: amd64 + run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net9.0 --filter Category=amd64 run-arm64-linux-container-tests: name: Run arm64 Linux Container Integration Tests diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs index e0f4f352c7..86ae2db323 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs @@ -13,7 +13,7 @@ namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk; -[Trait("Category", "x64")] +[Trait("Category", "amd64")] public class AwsSdkDynamoDBTest : NewRelicIntegrationTest { 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 ed6948b755..56dd3bd6db 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkMultiServiceTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkMultiServiceTest.cs @@ -12,7 +12,7 @@ namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk; -[Trait("Category", "x64")] +[Trait("Category", "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 c345ac833f..9b01c5cc00 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkSQSTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkSQSTest.cs @@ -13,7 +13,7 @@ namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk; -[Trait("Category", "x64")] +[Trait("Category", "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 85f3e43460..7f6896db63 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/InfiniteTracingContainerTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/InfiniteTracingContainerTests.cs @@ -79,15 +79,15 @@ 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("Category", "x64")] +[Trait("Category", "amd64")] public class DebianX64InfiniteTracingContainerTest(DebianX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); -//[Trait("Category", "x64")] +//[Trait("Category", "amd64")] //public class UbuntuX64InfiniteTracingContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); -[Trait("Category", "x64")] +[Trait("Category", "amd64")] public class AlpineX64InfiniteTracingContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); @@ -99,7 +99,7 @@ public class DebianArm64InfiniteTracingContainerTest(DebianArm64ContainerTestFix //public class UbuntuArm64InfiniteTracingContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); -//[Trait("Category", "x64")] +//[Trait("Category", "amd64")] //public class CentosX64InfiniteTracingContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); @@ -107,7 +107,7 @@ public class DebianArm64InfiniteTracingContainerTest(DebianArm64ContainerTestFix //public class CentosArm64InfiniteTracingContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); -[Trait("Category", "x64")] +[Trait("Category", "amd64")] public class AmazonX64InfiniteTracingContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); @@ -115,7 +115,7 @@ public class AmazonX64InfiniteTracingContainerTest(AmazonX64ContainerTestFixture public class AmazonArm64InfiniteTracingContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); -//[Trait("Category", "x64")] +//[Trait("Category", "amd64")] //public class FedoraX64InfiniteTracingContainerTest(FedoraX64ContainerTestFixture 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 9a37a78209..8a1f72d812 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs @@ -124,7 +124,7 @@ internal static string GenerateTopic() } } -[Trait("Category", "x64")] +[Trait("Category", "amd64")] public class KafkaDotNet8Test : LinuxKafkaTest { public KafkaDotNet8Test(KafkaDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -132,7 +132,7 @@ public KafkaDotNet8Test(KafkaDotNet8TestFixture fixture, ITestOutputHelper outpu } } -[Trait("Category", "x64")] +[Trait("Category", "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 d32589e2c9..e7e4015b20 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxContainerTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxContainerTests.cs @@ -49,7 +49,7 @@ public void Test() } } -[Trait("Category", "x64")] +[Trait("Category", "amd64")] public class DebianX64ContainerTest : LinuxContainerTest { public DebianX64ContainerTest(DebianX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -57,7 +57,7 @@ public DebianX64ContainerTest(DebianX64ContainerTestFixture fixture, ITestOutput } } -[Trait("Category", "x64")] +[Trait("Category", "amd64")] public class UbuntuX64ContainerTest : LinuxContainerTest { public UbuntuX64ContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -65,7 +65,7 @@ public UbuntuX64ContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutput } } -[Trait("Category", "x64")] +[Trait("Category", "amd64")] public class AlpineX64ContainerTest : LinuxContainerTest { public AlpineX64ContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -89,7 +89,7 @@ public UbuntuArm64ContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOu } } -[Trait("Category", "x64")] +[Trait("Category", "amd64")] public class CentosX64ContainerTest : LinuxContainerTest { public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -106,7 +106,7 @@ public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutput // } //} -[Trait("Category", "x64")] +[Trait("Category", "amd64")] public class AmazonX64ContainerTest : LinuxContainerTest { public AmazonX64ContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -122,7 +122,7 @@ public AmazonArm64ContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOu } } -[Trait("Category", "x64")] +[Trait("Category", "amd64")] public class FedoraX64ContainerTest : LinuxContainerTest { public FedoraX64ContainerTest(FedoraX64ContainerTestFixture 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 e3dc6ad1ed..1d1d0a4afb 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxUnicodeLogFileTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxUnicodeLogFileTest.cs @@ -18,7 +18,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("Category", "x64")] + [Trait("Category", "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 df5a7dd8aa..ab1ae4ffeb 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/MemcachedTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/MemcachedTests.cs @@ -130,7 +130,7 @@ public void Test() } } - [Trait("Category", "x64")] + [Trait("Category", "amd64")] public class MemcachedDotNet8Test : LinuxMemcachedTest { public MemcachedDotNet8Test(MemcachedDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -138,7 +138,7 @@ public MemcachedDotNet8Test(MemcachedDotNet8TestFixture fixture, ITestOutputHelp } } - [Trait("Category", "x64")] + [Trait("Category", "amd64")] public class MemcachedDotNet9Test : LinuxMemcachedTest { public MemcachedDotNet9Test(MemcachedDotNet9TestFixture fixture, ITestOutputHelper output) : base(fixture, output) From 188c6adef981aac70e937a397285980e011a75b6 Mon Sep 17 00:00:00 2001 From: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Date: Wed, 22 Jan 2025 15:58:41 -0600 Subject: [PATCH 9/9] Code cleanup --- .../workflows/run_linux_container_tests.yml | 5 ++-- .../docker-compose-awssdk.yml | 4 ++-- .../docker-compose-kafka.yml | 4 ++-- .../docker-compose-memcached.yml | 4 ++-- .../ContainerApplications/docker-compose.yml | 4 ++-- .../Tests/AwsSdk/AwsSdkDynamoDBTest.cs | 4 +--- .../Tests/AwsSdk/AwsSdkMultiServiceTest.cs | 4 +--- .../Tests/AwsSdk/AwsSdkSQSTest.cs | 2 +- .../Tests/InfiniteTracingContainerTests.cs | 24 +++++++++---------- .../Tests/KafkaTests.cs | 6 ++--- .../Tests/LinuxContainerTests.cs | 24 +++++++++---------- .../Tests/LinuxUnicodeLogFileTest.cs | 4 +--- .../Tests/MemcachedTests.cs | 6 ++--- 13 files changed, 40 insertions(+), 55 deletions(-) diff --git a/.github/workflows/run_linux_container_tests.yml b/.github/workflows/run_linux_container_tests.yml index 7adaba8cbf..f088724a84 100644 --- a/.github/workflows/run_linux_container_tests.yml +++ b/.github/workflows/run_linux_container_tests.yml @@ -82,7 +82,7 @@ jobs: - 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 Category=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 @@ -138,6 +138,5 @@ jobs: - 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 Category=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/docker-compose-awssdk.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-awssdk.yml index 6911e45813..c13a20a7f4 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-awssdk.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-awssdk.yml @@ -3,8 +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 -# BUILD_ARCH the build 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 diff --git a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml index a220f3d629..8aed13d204 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml @@ -3,8 +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 -# BUILD_ARCH the build 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 diff --git a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-memcached.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-memcached.yml index b4a119dada..6028c61af1 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-memcached.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-memcached.yml @@ -3,8 +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 -# BUILD_ARCH the build 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 diff --git a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml index 51f1787c32..9944a4feda 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml @@ -3,8 +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 -# BUILD_ARCH the build 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 diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs index 86ae2db323..88ce76c33a 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkDynamoDBTest.cs @@ -6,14 +6,12 @@ using System.Linq; using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; -using NUnit.Framework; using Xunit; using Xunit.Abstractions; -using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk; -[Trait("Category", "amd64")] +[Trait("Architecture", "amd64")] public class AwsSdkDynamoDBTest : NewRelicIntegrationTest { 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 56dd3bd6db..dd03cd4059 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkMultiServiceTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkMultiServiceTest.cs @@ -5,14 +5,12 @@ using System.Linq; using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; -using NUnit.Framework; using Xunit; using Xunit.Abstractions; -using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk; -[Trait("Category", "amd64")] +[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 9b01c5cc00..ff5d3a853f 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkSQSTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/AwsSdk/AwsSdkSQSTest.cs @@ -13,7 +13,7 @@ namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk; -[Trait("Category", "amd64")] +[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 7f6896db63..12bc4edf6c 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/InfiniteTracingContainerTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/InfiniteTracingContainerTests.cs @@ -6,10 +6,8 @@ using System.Linq; using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; -using NUnit.Framework; using Xunit; using Xunit.Abstractions; -using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests; @@ -79,46 +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("Category", "amd64")] +[Trait("Architecture", "amd64")] public class DebianX64InfiniteTracingContainerTest(DebianX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); -//[Trait("Category", "amd64")] +//[Trait("Architecture", "amd64")] //public class UbuntuX64InfiniteTracingContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); -[Trait("Category", "amd64")] +[Trait("Architecture", "amd64")] public class AlpineX64InfiniteTracingContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); -[Trait("Category", "arm64")] +[Trait("Architecture", "arm64")] public class DebianArm64InfiniteTracingContainerTest(DebianArm64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); -//[Trait("Category", "arm64")] +//[Trait("Architecture", "arm64")] //public class UbuntuArm64InfiniteTracingContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); -//[Trait("Category", "amd64")] +//[Trait("Architecture", "amd64")] //public class CentosX64InfiniteTracingContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); -//[Trait("Category", "arm64")] +//[Trait("Architecture", "arm64")] //public class CentosArm64InfiniteTracingContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); -[Trait("Category", "amd64")] +[Trait("Architecture", "amd64")] public class AmazonX64InfiniteTracingContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); -[Trait("Category", "arm64")] +[Trait("Architecture", "arm64")] public class AmazonArm64InfiniteTracingContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOutputHelper output) : InfiniteTracingContainerTest(fixture, output); -//[Trait("Category", "amd64")] +//[Trait("Architecture", "amd64")] //public class FedoraX64InfiniteTracingContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutputHelper output) // : InfiniteTracingContainerTest(fixture, output); -//[Trait("Category", "arm64")] +//[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 8a1f72d812..a56108e9f6 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs @@ -9,10 +9,8 @@ using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; using NewRelic.Testing.Assertions; -using NUnit.Framework; using Xunit; using Xunit.Abstractions; -using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests; @@ -124,7 +122,7 @@ internal static string GenerateTopic() } } -[Trait("Category", "amd64")] +[Trait("Architecture", "amd64")] public class KafkaDotNet8Test : LinuxKafkaTest { public KafkaDotNet8Test(KafkaDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -132,7 +130,7 @@ public KafkaDotNet8Test(KafkaDotNet8TestFixture fixture, ITestOutputHelper outpu } } -[Trait("Category", "amd64")] +[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 e7e4015b20..a51700725c 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxContainerTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxContainerTests.cs @@ -4,10 +4,8 @@ using System; using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; -using NUnit.Framework; using Xunit; using Xunit.Abstractions; -using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests; @@ -49,7 +47,7 @@ public void Test() } } -[Trait("Category", "amd64")] +[Trait("Architecture", "amd64")] public class DebianX64ContainerTest : LinuxContainerTest { public DebianX64ContainerTest(DebianX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -57,7 +55,7 @@ public DebianX64ContainerTest(DebianX64ContainerTestFixture fixture, ITestOutput } } -[Trait("Category", "amd64")] +[Trait("Architecture", "amd64")] public class UbuntuX64ContainerTest : LinuxContainerTest { public UbuntuX64ContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -65,7 +63,7 @@ public UbuntuX64ContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutput } } -[Trait("Category", "amd64")] +[Trait("Architecture", "amd64")] public class AlpineX64ContainerTest : LinuxContainerTest { public AlpineX64ContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -73,7 +71,7 @@ public AlpineX64ContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutput } } -[Trait("Category", "arm64")] +[Trait("Architecture", "arm64")] public class DebianArm64ContainerTest : LinuxContainerTest { public DebianArm64ContainerTest(DebianArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -81,7 +79,7 @@ public DebianArm64ContainerTest(DebianArm64ContainerTestFixture fixture, ITestOu } } -[Trait("Category", "arm64")] +[Trait("Architecture", "arm64")] public class UbuntuArm64ContainerTest : LinuxContainerTest { public UbuntuArm64ContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -89,7 +87,7 @@ public UbuntuArm64ContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOu } } -[Trait("Category", "amd64")] +[Trait("Architecture", "amd64")] public class CentosX64ContainerTest : LinuxContainerTest { public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -98,7 +96,7 @@ public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutput } // temporarily disabled until QEMU issue is resolved -//[Trait("Category", "arm64")] +//[Trait("Architecture", "arm64")] //public class CentosArm64ContainerTest : LinuxContainerTest //{ // public CentosArm64ContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -106,7 +104,7 @@ public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutput // } //} -[Trait("Category", "amd64")] +[Trait("Architecture", "amd64")] public class AmazonX64ContainerTest : LinuxContainerTest { public AmazonX64ContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -114,7 +112,7 @@ public AmazonX64ContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutput } } -[Trait("Category", "arm64")] +[Trait("Architecture", "arm64")] public class AmazonArm64ContainerTest : LinuxContainerTest { public AmazonArm64ContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -122,7 +120,7 @@ public AmazonArm64ContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOu } } -[Trait("Category", "amd64")] +[Trait("Architecture", "amd64")] public class FedoraX64ContainerTest : LinuxContainerTest { public FedoraX64ContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -130,7 +128,7 @@ public FedoraX64ContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutput } } -[Trait("Category", "arm64")] +[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 1d1d0a4afb..fc2d790481 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxUnicodeLogFileTest.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/LinuxUnicodeLogFileTest.cs @@ -4,10 +4,8 @@ using System; using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; -using NUnit.Framework; using Xunit; using Xunit.Abstractions; -using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests { @@ -18,7 +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("Category", "amd64")] + [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 ab1ae4ffeb..9d58a1c31d 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/MemcachedTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/MemcachedTests.cs @@ -7,10 +7,8 @@ using NewRelic.Agent.ContainerIntegrationTests.Fixtures; using NewRelic.Agent.IntegrationTestHelpers; using NewRelic.Testing.Assertions; -using NUnit.Framework; using Xunit; using Xunit.Abstractions; -using Assert = Xunit.Assert; namespace NewRelic.Agent.ContainerIntegrationTests.Tests { @@ -130,7 +128,7 @@ public void Test() } } - [Trait("Category", "amd64")] + [Trait("Architecture", "amd64")] public class MemcachedDotNet8Test : LinuxMemcachedTest { public MemcachedDotNet8Test(MemcachedDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output) @@ -138,7 +136,7 @@ public MemcachedDotNet8Test(MemcachedDotNet8TestFixture fixture, ITestOutputHelp } } - [Trait("Category", "amd64")] + [Trait("Architecture", "amd64")] public class MemcachedDotNet9Test : LinuxMemcachedTest { public MemcachedDotNet9Test(MemcachedDotNet9TestFixture fixture, ITestOutputHelper output) : base(fixture, output)