diff --git a/.github/workflows/run_linux_container_tests.yml b/.github/workflows/run_linux_container_tests.yml index 771eb96cf8..fc51982d8c 100644 --- a/.github/workflows/run_linux_container_tests.yml +++ b/.github/workflows/run_linux_container_tests.yml @@ -78,4 +78,4 @@ jobs: echo $INTEGRATION_TEST_SECRETS | dotnet user-secrets set --project ${{ env.integration_tests_shared_project }} - name: Build & Run Linux Container Integration Tests - run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net7.0 + run: dotnet test ./tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj --framework net8.0 diff --git a/tests/Agent/IntegrationTests/ContainerApplications/CustomBaseContainerBuild/README.md b/tests/Agent/IntegrationTests/ContainerApplications/CustomBaseContainerBuild/README.md index 4b5b039252..dd0eff00c8 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/CustomBaseContainerBuild/README.md +++ b/tests/Agent/IntegrationTests/ContainerApplications/CustomBaseContainerBuild/README.md @@ -18,11 +18,9 @@ From a Powershell command prompt in the same folder as this README file: ``` docker buildx build --build-arg DOTNET_VERSION="6.0" -f Dockerfile.AmazonBaseImage --tag dotnetreg.azurecr.io/amazonlinux-aspnet:6.0 --platform linux/amd64,linux/arm64/v8 --push . -docker buildx build --build-arg DOTNET_VERSION="7.0" -f Dockerfile.AmazonBaseImage --tag dotnetreg.azurecr.io/amazonlinux-aspnet:7.0 --platform linux/amd64,linux/arm64/v8 --push . 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="6.0" -f Dockerfile.FedoraBaseImage --tag fedora-aspnet:6.0 --platform linux/amd64,linux/arm64/v8 -push . -docker buildx build --build-arg DOTNET_VERSION="7.0" -f Dockerfile.FedoraBaseImage --tag fedora-aspnet:7.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 . ``` diff --git a/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/Dockerfile index a3ecc61e58..0df6cd5e79 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:7.0-bullseye-slim AS base +FROM --platform=amd64 mcr.microsoft.com/dotnet/aspnet:8.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:7.0-bullseye-slim AS build +FROM --platform=amd64 mcr.microsoft.com/dotnet/sdk:8.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 \ @@ -27,12 +27,12 @@ RUN dotnet restore "KafkaTestApp/KafkaTestApp.csproj" -p:TargetFramework=net${AP COPY . . WORKDIR "/src/KafkaTestApp" -RUN dotnet build "KafkaTestApp.csproj" -c Release -o /app/build --os linux --framework net${APP_DOTNET_VERSION} +RUN dotnet build "KafkaTestApp.csproj" -c Release -o /app/build --self-contained --os linux --framework net${APP_DOTNET_VERSION} FROM build AS publish ARG APP_DOTNET_VERSION -RUN dotnet publish "KafkaTestApp.csproj" -c Release -o /app/publish /p:UseAppHost=false --os linux --framework net${APP_DOTNET_VERSION} +RUN dotnet publish "KafkaTestApp.csproj" -c Release -o /app/publish --self-contained --os linux --framework net${APP_DOTNET_VERSION} FROM base AS final diff --git a/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/KafkaTestApp.csproj b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/KafkaTestApp.csproj index 7024d4e897..5cfd6e75e8 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/KafkaTestApp.csproj +++ b/tests/Agent/IntegrationTests/ContainerApplications/KafkaTestApp/KafkaTestApp.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0 + net6.0;net8.0 Linux . @@ -10,7 +10,7 @@ - + diff --git a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/SmokeTestApp.csproj b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/SmokeTestApp.csproj index 12bc1d8549..033d093daf 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/SmokeTestApp.csproj +++ b/tests/Agent/IntegrationTests/ContainerApplications/SmokeTestApp/SmokeTestApp.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 Linux . diff --git a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml index 3a66783862..7a35fa56fe 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-kafka.yml @@ -1,15 +1,13 @@ -version: "3" - # The following must be set either in environment variables or via a .env file in the same folder as this file: # # 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 7.0-bullseye-slim, 7.0-alpine, 7.0-jammy +# 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 # 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 -# DOTNET_VERSION The dotnet version number to use (7.0, 8.0, etc) +# DOTNET_VERSION The dotnet version number to use (8.0, etc) # TEST_DOCKERFILE The path and dockerfile to use for the service. # # NEW_RELIC_KAFKA_TOPIC diff --git a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-smoketestapp.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-smoketestapp.yml index c7c71029e0..50ddd8357d 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-smoketestapp.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose-smoketestapp.yml @@ -4,12 +4,12 @@ version: "3" # # 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 7.0-bullseye-slim, 7.0-alpine, 7.0-jammy +# 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 # 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 -# DOTNET_VERSION The dotnet version number to use (7.0, 8.0, etc) +# DOTNET_VERSION The dotnet version number to use (8.0, etc) # NETWORK_NAME The network name to use for containers in this app. Should be unique among all running instances. # TEST_DOCKERFILE The path and dockerfile to use for the service. # diff --git a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml index f5799cc448..6fc70b45f3 100644 --- a/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml +++ b/tests/Agent/IntegrationTests/ContainerApplications/docker-compose.yml @@ -1,15 +1,13 @@ -version: "3" - # The following must be set either in environment variables or via a .env file in the same folder as this file: # # 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 7.0-bullseye-slim, 7.0-alpine, 7.0-jammy +# 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 # 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 -# DOTNET_VERSION The dotnet version number to use (7.0, 8.0, etc) +# DOTNET_VERSION The dotnet version number to use (8.0, etc) # TEST_DOCKERFILE The path and dockerfile to use for the service. # # and the usual suspects: diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj b/tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj index 2ea9d180e2..434b51c364 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/ContainerIntegrationTests.csproj @@ -3,7 +3,7 @@ NewRelic.Agent.ContainerIntegrationTests NewRelic.Agent.ContainerIntegrationTests - net7.0 + net8.0 diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Fixtures/ContainerTestFixtures.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Fixtures/ContainerTestFixtures.cs index b4fda94995..63e005aa49 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Fixtures/ContainerTestFixtures.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Fixtures/ContainerTestFixtures.cs @@ -10,7 +10,7 @@ namespace NewRelic.Agent.ContainerIntegrationTests.Fixtures; public abstract class ContainerTestFixtureBase : RemoteApplicationFixture { - private const string DotnetVersion = "7.0"; + private const string DotnetVersion = "8.0"; protected override int MaxTries => 1; @@ -44,7 +44,7 @@ public class UbuntuX64ContainerTestFixture : ContainerTestFixtureBase { private const string Dockerfile = "SmokeTestApp/Dockerfile"; private const ContainerApplication.Architecture Architecture = ContainerApplication.Architecture.X64; - private const string DistroTag = "bullseye-slim"; + private const string DistroTag = "bookworm-slim"; public UbuntuX64ContainerTestFixture() : base(DistroTag, Architecture, Dockerfile) { } } @@ -70,7 +70,7 @@ public class UbuntuArm64ContainerTestFixture : ContainerTestFixtureBase { private const string Dockerfile = "SmokeTestApp/Dockerfile"; private const ContainerApplication.Architecture Architecture = ContainerApplication.Architecture.Arm64; - private const string DistroTag = "bullseye-slim"; + private const string DistroTag = "bookworm-slim"; public UbuntuArm64ContainerTestFixture() : base(DistroTag, Architecture, Dockerfile) { } } diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Fixtures/KafkaTestFixtures.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Fixtures/KafkaTestFixtures.cs index c5ad9a8714..59481ee213 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Fixtures/KafkaTestFixtures.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Fixtures/KafkaTestFixtures.cs @@ -39,18 +39,18 @@ public class KafkaDotNet6TestFixture : KafkaTestFixtureBase { private const string Dockerfile = "KafkaTestApp/Dockerfile"; private const ContainerApplication.Architecture Architecture = ContainerApplication.Architecture.X64; - private const string DistroTag = "bullseye-slim"; + private const string DistroTag = "bookworm-slim"; private const string DotnetVersion = "6.0"; public KafkaDotNet6TestFixture() : base(DistroTag, Architecture, Dockerfile, DotnetVersion) { } } -public class KafkaDotNet7TestFixture : KafkaTestFixtureBase +public class KafkaDotNet8TestFixture : KafkaTestFixtureBase { private const string Dockerfile = "KafkaTestApp/Dockerfile"; private const ContainerApplication.Architecture Architecture = ContainerApplication.Architecture.X64; - private const string DistroTag = "bullseye-slim"; - private const string DotnetVersion = "7.0"; + private const string DistroTag = "bookworm-slim"; + private const string DotnetVersion = "8.0"; - public KafkaDotNet7TestFixture() : base(DistroTag, Architecture, Dockerfile, DotnetVersion) { } + public KafkaDotNet8TestFixture() : base(DistroTag, Architecture, Dockerfile, DotnetVersion) { } } diff --git a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs index 5acf079e96..29787e6b47 100644 --- a/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs +++ b/tests/Agent/IntegrationTests/ContainerIntegrationTests/Tests/KafkaTests.cs @@ -117,9 +117,9 @@ public KafkaDotNet6Test(KafkaDotNet6TestFixture fixture, ITestOutputHelper outpu } } -public class KafkaDotNet7Test : LinuxKafkaTest +public class KafkaDotNet8Test : LinuxKafkaTest { - public KafkaDotNet7Test(KafkaDotNet7TestFixture fixture, ITestOutputHelper output) : base(fixture, output) + public KafkaDotNet8Test(KafkaDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output) { } } diff --git a/tests/Agent/IntegrationTests/IntegrationTestHelpers/IntegrationTestHelpers.csproj b/tests/Agent/IntegrationTests/IntegrationTestHelpers/IntegrationTestHelpers.csproj index eb38d43edd..c37127544f 100644 --- a/tests/Agent/IntegrationTests/IntegrationTestHelpers/IntegrationTestHelpers.csproj +++ b/tests/Agent/IntegrationTests/IntegrationTestHelpers/IntegrationTestHelpers.csproj @@ -1,6 +1,6 @@ - netstandard2.0;net7.0 + netstandard2.0;net8.0 NewRelic.Agent.IntegrationTestHelpers NewRelic.Agent.IntegrationTestHelpers diff --git a/tests/Agent/IntegrationTests/IntegrationTestHelpers/RemoteServiceFixtures/ConsoleDynamicMethodFixture.cs b/tests/Agent/IntegrationTests/IntegrationTestHelpers/RemoteServiceFixtures/ConsoleDynamicMethodFixture.cs index 62187d63b5..684c22f764 100644 --- a/tests/Agent/IntegrationTests/IntegrationTestHelpers/RemoteServiceFixtures/ConsoleDynamicMethodFixture.cs +++ b/tests/Agent/IntegrationTests/IntegrationTestHelpers/RemoteServiceFixtures/ConsoleDynamicMethodFixture.cs @@ -88,13 +88,6 @@ public ConsoleDynamicMethodFixtureCore60() : base("net6.0") } } - public class ConsoleDynamicMethodFixtureCore70 : ConsoleDynamicMethodFixtureCoreSpecificVersion - { - public ConsoleDynamicMethodFixtureCore70() : base("net7.0") - { - } - } - public class ConsoleDynamicMethodFixtureCore80 : ConsoleDynamicMethodFixtureCoreSpecificVersion { public ConsoleDynamicMethodFixtureCore80() : base("net8.0") diff --git a/tests/Agent/IntegrationTests/Shared/Shared.csproj b/tests/Agent/IntegrationTests/Shared/Shared.csproj index 805ed2c5ca..89ece5e26a 100644 --- a/tests/Agent/IntegrationTests/Shared/Shared.csproj +++ b/tests/Agent/IntegrationTests/Shared/Shared.csproj @@ -1,7 +1,7 @@ - netstandard2.0;net462;net7.0 + netstandard2.0;net462;net8.0 Shared NewRelic.Agent.IntegrationTests.Shared Project containing items shared across test applications, test libraries, and test runners. diff --git a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/MultiFunctionApplicationHelpers.csproj b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/MultiFunctionApplicationHelpers.csproj index 359a04a6d4..df2cb650aa 100644 --- a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/MultiFunctionApplicationHelpers.csproj +++ b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/MultiFunctionApplicationHelpers.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0;net8.0;net462;net471;net48;net481 + net6.0;net8.0;net462;net471;net48;net481 true true @@ -13,7 +13,6 @@ - @@ -21,7 +20,6 @@ - @@ -36,8 +34,6 @@ - - @@ -54,11 +50,9 @@ - - @@ -68,7 +62,6 @@ - @@ -93,7 +86,6 @@ - @@ -104,7 +96,6 @@ - @@ -115,7 +106,6 @@ - @@ -126,7 +116,6 @@ - @@ -137,7 +126,6 @@ - @@ -148,7 +136,6 @@ - @@ -178,16 +165,10 @@ - - - - - + - - @@ -224,7 +205,6 @@ - @@ -233,7 +213,6 @@ - @@ -261,21 +240,16 @@ - - - - - @@ -287,7 +261,6 @@ - @@ -306,7 +279,6 @@ - @@ -345,7 +317,6 @@ - @@ -357,7 +328,6 @@ - diff --git a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/Controllers/TestContextController.cs b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/Controllers/TestContextController.cs index 0e233ef9b7..6f4c2334bb 100644 --- a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/Controllers/TestContextController.cs +++ b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/Controllers/TestContextController.cs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 -#if NET7_0_OR_GREATER +#if NET8_0_OR_GREATER using System.Collections.Generic; using Microsoft.AspNetCore.Mvc; diff --git a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/Controllers/TestController.cs b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/Controllers/TestController.cs index 809f74b50a..346949053f 100644 --- a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/Controllers/TestController.cs +++ b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/Controllers/TestController.cs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 -#if NET7_0_OR_GREATER +#if NET8_0_OR_GREATER using System; using Microsoft.AspNetCore.Mvc; diff --git a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/LoggingTester.cs b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/LoggingTester.cs index 7bfc4fe2b3..c8fa066ff8 100644 --- a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/LoggingTester.cs +++ b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/LoggingTester.cs @@ -26,8 +26,8 @@ public static void SetFramework(string loggingFramework, string loggingPort) case "SERILOG": _log = new SerilogLoggingAdapter(); break; - case "SERILOGWEB": // .NET 7.0+ ONLY -#if NET7_0_OR_GREATER + case "SERILOGWEB": // .NET 8.0+ ONLY +#if NET8_0_OR_GREATER _log = new SerilogLoggingWebAdapter(loggingPort); #endif break; @@ -55,7 +55,7 @@ public static void SetFramework(string loggingFramework, string loggingPort) #endif break; case "NLOGEL": -#if NET7_0_OR_GREATER || NET481_OR_GREATER +#if NET8_0_OR_GREATER || NET481_OR_GREATER _log = new NLogExtensionsLoggingAdapter(); #endif break; diff --git a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/NLogExtensionsLoggingAdapter.cs b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/NLogExtensionsLoggingAdapter.cs index 86ebf33418..f03a6bfe46 100644 --- a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/NLogExtensionsLoggingAdapter.cs +++ b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/NLogExtensionsLoggingAdapter.cs @@ -1,8 +1,8 @@ -// Copyright 2020 New Relic, Inc. All rights reserved. +// Copyright 2020 New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 -#if NET7_0_OR_GREATER || NET481_OR_GREATER +#if NET8_0_OR_GREATER || NET481_OR_GREATER using System; using System.Collections.Generic; diff --git a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/SerilogLoggingWebAdapter.cs b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/SerilogLoggingWebAdapter.cs index 5280151c9c..0bb2c96646 100644 --- a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/SerilogLoggingWebAdapter.cs +++ b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/LogInstrumentation/SerilogLoggingWebAdapter.cs @@ -1,7 +1,7 @@ // Copyright 2020 New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 -#if NET7_0_OR_GREATER +#if NET8_0_OR_GREATER using System; using System.Collections.Generic; diff --git a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/MassTransit/MassTransitExerciser.cs b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/MassTransit/MassTransitExerciser.cs index 36b5d3c1a7..2b3c06f6d7 100644 --- a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/MassTransit/MassTransitExerciser.cs +++ b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/MassTransit/MassTransitExerciser.cs @@ -1,7 +1,7 @@ // Copyright 2020 New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 -#if !NET481_OR_GREATER && !NET7_0_OR_GREATER +#if !NET481_OR_GREATER && !NET8_0_OR_GREATER #define MASSTRANSIT7 #endif diff --git a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/MySql/MySqlExerciser.cs b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/MySql/MySqlExerciser.cs index 2d2aaee7c1..6a4090b9dd 100644 --- a/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/MySql/MySqlExerciser.cs +++ b/tests/Agent/IntegrationTests/SharedApplications/Common/MultiFunctionApplicationHelpers/NetStandardLibraries/MySql/MySqlExerciser.cs @@ -1,8 +1,6 @@ // Copyright 2020 New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 -#if !NET7_0 // there is no .NET 7 test for MySql - using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; @@ -109,4 +107,3 @@ private void CreateProcedure(string procedureName) } } } -#endif diff --git a/tests/Agent/IntegrationTests/SharedApplications/Common/SharedApplicationHelpers/SharedApplicationHelpers.csproj b/tests/Agent/IntegrationTests/SharedApplications/Common/SharedApplicationHelpers/SharedApplicationHelpers.csproj index 6ab9ba2ac8..52e0202532 100644 --- a/tests/Agent/IntegrationTests/SharedApplications/Common/SharedApplicationHelpers/SharedApplicationHelpers.csproj +++ b/tests/Agent/IntegrationTests/SharedApplications/Common/SharedApplicationHelpers/SharedApplicationHelpers.csproj @@ -1,7 +1,7 @@ - netstandard2.0;net462;net7.0 + netstandard2.0;net462;net8.0 The code in this project is shared with every test application, and should not be used in a test runner. diff --git a/tests/Agent/IntegrationTests/SharedApplications/ConsoleMultiFunctionApplicationCore/ConsoleMultiFunctionApplicationCore.csproj b/tests/Agent/IntegrationTests/SharedApplications/ConsoleMultiFunctionApplicationCore/ConsoleMultiFunctionApplicationCore.csproj index 35a706677c..e7c66ddb38 100644 --- a/tests/Agent/IntegrationTests/SharedApplications/ConsoleMultiFunctionApplicationCore/ConsoleMultiFunctionApplicationCore.csproj +++ b/tests/Agent/IntegrationTests/SharedApplications/ConsoleMultiFunctionApplicationCore/ConsoleMultiFunctionApplicationCore.csproj @@ -2,7 +2,7 @@ Exe - net6.0;net7.0;net8.0 + net6.0;net8.0 true diff --git a/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlQueryParamTests.cs b/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlQueryParamTests.cs index 0b8eaddbe5..768a3fb3bf 100644 --- a/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlQueryParamTests.cs +++ b/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlQueryParamTests.cs @@ -205,34 +205,6 @@ public MsSqlQueryParamTests_SystemData_NoAtSigns_FWLatest(ConsoleDynamicMethodFi #region System.Data.SqlClient (.NET Core/5+ only) - // Set to net7 since the package this relies on does not currently support net8. - [NetCoreTest] - public class MsSqlQueryParamTests_SystemDataSqlClient_CoreLatest : MsSqlQueryParamTestsBase - { - public MsSqlQueryParamTests_SystemDataSqlClient_CoreLatest(ConsoleDynamicMethodFixtureCore70 fixture, ITestOutputHelper output) - : base( - fixture: fixture, - output: output, - excerciserName: "SystemDataSqlClientExerciser", - paramsWithAtSign: true) - { - } - } - - // Set to net7 since the package this relies on does not currently support net8. - [NetCoreTest] - public class MsSqlQueryParamTests_SystemDataSqlClient_NoAtSigns_CoreLatest : MsSqlQueryParamTestsBase - { - public MsSqlQueryParamTests_SystemDataSqlClient_NoAtSigns_CoreLatest(ConsoleDynamicMethodFixtureCore70 fixture, ITestOutputHelper output) - : base( - fixture: fixture, - output: output, - excerciserName: "SystemDataSqlClientExerciser", - paramsWithAtSign: false) - { - } - } - [NetCoreTest] public class MsSqlQueryParamTests_SystemDataSqlClient_CoreOldest : MsSqlQueryParamTestsBase { @@ -320,34 +292,6 @@ public MsSqlQueryParamTests_MicrosoftDataSqlClient_NoAtSigns_FW462(ConsoleDynami } } - // Set to net7 since the package this relies on does not currently support net8. - [NetCoreTest] - public class MsSqlQueryParamTests_MicrosoftDataSqlClient_CoreLatest : MsSqlQueryParamTestsBase - { - public MsSqlQueryParamTests_MicrosoftDataSqlClient_CoreLatest(ConsoleDynamicMethodFixtureCore70 fixture, ITestOutputHelper output) - : base( - fixture: fixture, - output: output, - excerciserName: "MicrosoftDataSqlClientExerciser", - paramsWithAtSign: true) - { - } - } - - // Set to net7 since the package this relies on does not currently support net8. - [NetCoreTest] - public class MsSqlQueryParamTests_MicrosoftDataSqlClient_NoAtSigns_CoreLatest : MsSqlQueryParamTestsBase - { - public MsSqlQueryParamTests_MicrosoftDataSqlClient_NoAtSigns_CoreLatest(ConsoleDynamicMethodFixtureCore70 fixture, ITestOutputHelper output) - : base( - fixture: fixture, - output: output, - excerciserName: "MicrosoftDataSqlClientExerciser", - paramsWithAtSign: false) - { - } - } - [NetCoreTest] public class MsSqlQueryParamTests_MicrosoftDataSqlClient_CoreOldest : MsSqlQueryParamTestsBase { diff --git a/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlStoredProcedureTests.cs b/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlStoredProcedureTests.cs index 3f6a7f4f10..6f3301402a 100644 --- a/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlStoredProcedureTests.cs +++ b/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlStoredProcedureTests.cs @@ -153,19 +153,6 @@ public MsSqlStoredProcedureTests_SystemData_FWLatest(ConsoleDynamicMethodFixture #region System.Data.SqlClient (.NET Core/5+ only) - // Set to net7 since the package this relies on does not currently support net8. - [NetCoreTest] - public class MsSqlStoredProcedureTests_SystemDataSqlClient_CoreLatest : MsSqlStoredProcedureTestsBase - { - public MsSqlStoredProcedureTests_SystemDataSqlClient_CoreLatest(ConsoleDynamicMethodFixtureCore70 fixture, ITestOutputHelper output) - : base( - fixture: fixture, - output: output, - excerciserName: "SystemDataSqlClientExerciser") - { - } - } - [NetCoreTest] public class MsSqlStoredProcedureTests_SystemDataSqlClient_CoreOldest : MsSqlStoredProcedureTestsBase { @@ -207,19 +194,6 @@ public MsSqlStoredProcedureTests_MicrosoftDataSqlClient_FW462(ConsoleDynamicMeth } } - // Set to net7 since the package this relies on does not currently support net8. - [NetCoreTest] - public class MsSqlStoredProcedureTests_MicrosoftDataSqlClient_CoreLatest : MsSqlStoredProcedureTestsBase - { - public MsSqlStoredProcedureTests_MicrosoftDataSqlClient_CoreLatest(ConsoleDynamicMethodFixtureCore70 fixture, ITestOutputHelper output) - : base( - fixture: fixture, - output: output, - excerciserName: "MicrosoftDataSqlClientExerciser") - { - } - } - [NetCoreTest] public class MsSqlStoredProcedureTests_MicrosoftDataSqlClient_CoreOldest : MsSqlStoredProcedureTestsBase { diff --git a/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlTests.cs b/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlTests.cs index 7e7eb0c21d..420d9a2351 100644 --- a/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlTests.cs +++ b/tests/Agent/IntegrationTests/UnboundedIntegrationTests/MsSql/MsSqlTests.cs @@ -261,20 +261,6 @@ public MsSqlTests_SystemData_FWLatest(ConsoleDynamicMethodFixtureFWLatest fixtur } } - // Set to net7 since the package this relies on does not currently support net8. - [NetCoreTest] - public class MsSqlTests_SystemDataSqlClient_CoreLatest : MsSqlTestsBase - { - public MsSqlTests_SystemDataSqlClient_CoreLatest(ConsoleDynamicMethodFixtureCore70 fixture, ITestOutputHelper output) - : base( - fixture: fixture, - output: output, - excerciserName: "SystemDataSqlClientExerciser", - libraryName: "System.Data.SqlClient") - { - } - } - [NetCoreTest] public class MsSqlTests_SystemDataSqlClient_CoreOldest : MsSqlTestsBase { @@ -314,20 +300,6 @@ public MsSqlTests_MicrosoftDataSqlClient_FW462(ConsoleDynamicMethodFixtureFW462 } } - // Set to net7 since the package this relies on does not currently support net8. - [NetCoreTest] - public class MsSqlTests_MicrosoftDataSqlClient_CoreLatest : MsSqlTestsBase - { - public MsSqlTests_MicrosoftDataSqlClient_CoreLatest(ConsoleDynamicMethodFixtureCore70 fixture, ITestOutputHelper output) - : base( - fixture: fixture, - output: output, - excerciserName: "MicrosoftDataSqlClientExerciser", - libraryName: "Microsoft.Data.SqlClient") - { - } - } - [NetCoreTest] public class MsSqlTests_MicrosoftDataSqlClient_CoreOldest : MsSqlTestsBase { diff --git a/tests/Agent/NewRelic.Testing.Assertions/NewRelic.Testing.Assertions.csproj b/tests/Agent/NewRelic.Testing.Assertions/NewRelic.Testing.Assertions.csproj index 25e2113d77..d1d02061e3 100644 --- a/tests/Agent/NewRelic.Testing.Assertions/NewRelic.Testing.Assertions.csproj +++ b/tests/Agent/NewRelic.Testing.Assertions/NewRelic.Testing.Assertions.csproj @@ -1,6 +1,6 @@ - net462;net7.0 + net462;net8.0 diff --git a/tests/Agent/UnitTests/CompositeTests/CompositeTests.csproj b/tests/Agent/UnitTests/CompositeTests/CompositeTests.csproj index 0b86250096..ab7ff9e5dd 100644 --- a/tests/Agent/UnitTests/CompositeTests/CompositeTests.csproj +++ b/tests/Agent/UnitTests/CompositeTests/CompositeTests.csproj @@ -1,6 +1,6 @@ - net462;net7.0 + net462;net8.0 CompositeTests NewRelic.Agent.Core.CompositeTests Full @@ -26,7 +26,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/tests/Agent/UnitTests/Core.UnitTest/Core.UnitTest.csproj b/tests/Agent/UnitTests/Core.UnitTest/Core.UnitTest.csproj index 6215908e94..251cd52d6c 100644 --- a/tests/Agent/UnitTests/Core.UnitTest/Core.UnitTest.csproj +++ b/tests/Agent/UnitTests/Core.UnitTest/Core.UnitTest.csproj @@ -1,13 +1,11 @@ - net462;net7.0 + net462;net8.0 NewRelic.Agent.Core NewRelic.Agent.Core.UnitTest Full $(SolutionDir)test.runsettings - - all @@ -27,8 +25,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/tests/Agent/UnitTests/Core.UnitTest/CrossAgentTests/CatMapTests.cs b/tests/Agent/UnitTests/Core.UnitTest/CrossAgentTests/CatMapTests.cs index 8c089221fe..06514be250 100644 --- a/tests/Agent/UnitTests/Core.UnitTest/CrossAgentTests/CatMapTests.cs +++ b/tests/Agent/UnitTests/Core.UnitTest/CrossAgentTests/CatMapTests.cs @@ -124,7 +124,11 @@ public void Test(TestCase testCase) { var transactionName = GetTransactionNameFromString(request.OutboundTxnName); _transaction.CandidateTransactionName.TrySet(transactionName, (TransactionNamePriority)namePriority++); +#if NETFRAMEWORK var outboundHeaders = _agent.CurrentTransaction.GetRequestMetadata().ToDictionary(); +#else + var outboundHeaders = Enumerable.ToDictionary(_agent.CurrentTransaction.GetRequestMetadata()); +#endif var actualOutboundPayload = _catHeaderHandler.TryDecodeInboundRequestHeaders(outboundHeaders, GetHeaderValue); var requestData = new CrossApplicationRequestData( (string)request.ExpectedOutboundPayload[0], diff --git a/tests/Agent/UnitTests/Core.UnitTest/Utilities/IEnumerableExtensions.cs b/tests/Agent/UnitTests/Core.UnitTest/Utilities/IEnumerableExtensions.cs index f308905283..b9f4f0b6bf 100644 --- a/tests/Agent/UnitTests/Core.UnitTest/Utilities/IEnumerableExtensions.cs +++ b/tests/Agent/UnitTests/Core.UnitTest/Utilities/IEnumerableExtensions.cs @@ -18,7 +18,7 @@ public class Class_IEnumerableExtensions [TestCase(5, 6, 8, 9, ExpectedResult = false, Description = "Broken sequence")] public bool IsSequential_ReturnsTrue_IfSequenceIsSequential(params int[] list) { - var isSequential = list.Cast().IsSequential(); + var isSequential = list.Select(Convert.ToUInt32).IsSequential(); return isSequential; } diff --git a/tests/Agent/UnitTests/NewRelic.Agent.TestUtilities/NewRelic.Agent.TestUtilities.csproj b/tests/Agent/UnitTests/NewRelic.Agent.TestUtilities/NewRelic.Agent.TestUtilities.csproj index 34c0e656b5..7d06171c75 100644 --- a/tests/Agent/UnitTests/NewRelic.Agent.TestUtilities/NewRelic.Agent.TestUtilities.csproj +++ b/tests/Agent/UnitTests/NewRelic.Agent.TestUtilities/NewRelic.Agent.TestUtilities.csproj @@ -1,6 +1,6 @@ - net462;net7.0 + net462;net8.0 NewRelic.Agent.TestUtilities NewRelic.Agent.TestUtilities diff --git a/tests/AwsLambda/UnitTests/AwsLambdaOpenTracerTests/AwsLambdaOpenTracerTests.csproj b/tests/AwsLambda/UnitTests/AwsLambdaOpenTracerTests/AwsLambdaOpenTracerTests.csproj index 06e02acff1..1c60fdf3ca 100644 --- a/tests/AwsLambda/UnitTests/AwsLambdaOpenTracerTests/AwsLambdaOpenTracerTests.csproj +++ b/tests/AwsLambda/UnitTests/AwsLambdaOpenTracerTests/AwsLambdaOpenTracerTests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 NewRelic.Tests.AwsLambda.AwsLambdaOpenTracerTests NewRelic.Tests.AwsLambda.AwsLambdaOpenTracerTests true diff --git a/tests/AwsLambda/UnitTests/AwsLambdaWrapperTests/AwsLambdaWrapperTests.csproj b/tests/AwsLambda/UnitTests/AwsLambdaWrapperTests/AwsLambdaWrapperTests.csproj index ebbc73f19c..b5aebff806 100644 --- a/tests/AwsLambda/UnitTests/AwsLambdaWrapperTests/AwsLambdaWrapperTests.csproj +++ b/tests/AwsLambda/UnitTests/AwsLambdaWrapperTests/AwsLambdaWrapperTests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 NewRelic.Tests.AwsLambda.AwsLambdaWrapperTests NewRelic.Tests.AwsLambda.AwsLambdaWrapperTests true diff --git a/tests/NewRelic.Core.Tests/DotnetVersionTests.cs b/tests/NewRelic.Core.Tests/DotnetVersionTests.cs index f7566b6eab..7866ca3b87 100644 --- a/tests/NewRelic.Core.Tests/DotnetVersionTests.cs +++ b/tests/NewRelic.Core.Tests/DotnetVersionTests.cs @@ -1,4 +1,4 @@ -// Copyright 2020 New Relic, Inc. All rights reserved. +// Copyright 2020 New Relic, Inc. All rights reserved. // SPDX-License-Identifier: Apache-2.0 using NUnit.Framework; @@ -14,6 +14,7 @@ public class DotnetVersionTests [TestCase(DotnetCoreVersion.net5, ExpectedResult = true)] [TestCase(DotnetCoreVersion.net6, ExpectedResult = false)] [TestCase(DotnetCoreVersion.net7, ExpectedResult = false)] + [TestCase(DotnetCoreVersion.net8, ExpectedResult = false)] [TestCase(DotnetCoreVersion.Other, ExpectedResult = false)] public bool IsUnsupportedDotnetCoreVersion(DotnetCoreVersion version) {