Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tippmar-nr committed Jan 22, 2025
1 parent 26940d7 commit 188c6ad
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 55 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/run_linux_container_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<AwsSdkContainerDynamoDBTestFixture>
{
private readonly AwsSdkContainerDynamoDBTestFixture _fixture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<AwsSdkContainerMultiServiceTestFixture>
{
private readonly AwsSdkContainerMultiServiceTestFixture _fixture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace NewRelic.Agent.ContainerIntegrationTests.Tests.AwsSdk;

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public abstract class AwsSdkSQSTestBase : NewRelicIntegrationTest<AwsSdkContainerSQSTestFixture>
{
private readonly AwsSdkContainerSQSTestFixture _fixture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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<DebianX64ContainerTestFixture>(fixture, output);

//[Trait("Category", "amd64")]
//[Trait("Architecture", "amd64")]
//public class UbuntuX64InfiniteTracingContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutputHelper output)
// : InfiniteTracingContainerTest<UbuntuX64ContainerTestFixture>(fixture, output);

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class AlpineX64InfiniteTracingContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutputHelper output)
: InfiniteTracingContainerTest<AlpineX64ContainerTestFixture>(fixture, output);

[Trait("Category", "arm64")]
[Trait("Architecture", "arm64")]
public class DebianArm64InfiniteTracingContainerTest(DebianArm64ContainerTestFixture fixture, ITestOutputHelper output)
: InfiniteTracingContainerTest<DebianArm64ContainerTestFixture>(fixture, output);

//[Trait("Category", "arm64")]
//[Trait("Architecture", "arm64")]
//public class UbuntuArm64InfiniteTracingContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOutputHelper output)
// : InfiniteTracingContainerTest<UbuntuArm64ContainerTestFixture>(fixture, output);

//[Trait("Category", "amd64")]
//[Trait("Architecture", "amd64")]
//public class CentosX64InfiniteTracingContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output)
// : InfiniteTracingContainerTest<CentosX64ContainerTestFixture>(fixture, output);

//[Trait("Category", "arm64")]
//[Trait("Architecture", "arm64")]
//public class CentosArm64InfiniteTracingContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output)
// : InfiniteTracingContainerTest<CentosArm64ContainerTestFixture>(fixture, output);

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class AmazonX64InfiniteTracingContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output)
: InfiniteTracingContainerTest<AmazonX64ContainerTestFixture>(fixture, output);

[Trait("Category", "arm64")]
[Trait("Architecture", "arm64")]
public class AmazonArm64InfiniteTracingContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOutputHelper output)
: InfiniteTracingContainerTest<AmazonArm64ContainerTestFixture>(fixture, output);

//[Trait("Category", "amd64")]
//[Trait("Architecture", "amd64")]
//public class FedoraX64InfiniteTracingContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutputHelper output)
// : InfiniteTracingContainerTest<FedoraX64ContainerTestFixture>(fixture, output);

//[Trait("Category", "arm64")]
//[Trait("Architecture", "arm64")]
//public class FedoraArm64InfiniteTracingContainerTest(FedoraArm64ContainerTestFixture fixture, ITestOutputHelper output)
// : InfiniteTracingContainerTest<FedoraArm64ContainerTestFixture>(fixture, output);
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -124,15 +122,15 @@ internal static string GenerateTopic()
}
}

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class KafkaDotNet8Test : LinuxKafkaTest<KafkaDotNet8TestFixture>
{
public KafkaDotNet8Test(KafkaDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class KafkaDotNet9Test : LinuxKafkaTest<KafkaDotNet9TestFixture>
{
public KafkaDotNet9Test(KafkaDotNet9TestFixture fixture, ITestOutputHelper output) : base(fixture, output)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -49,47 +47,47 @@ public void Test()
}
}

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class DebianX64ContainerTest : LinuxContainerTest<DebianX64ContainerTestFixture>
{
public DebianX64ContainerTest(DebianX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class UbuntuX64ContainerTest : LinuxContainerTest<UbuntuX64ContainerTestFixture>
{
public UbuntuX64ContainerTest(UbuntuX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class AlpineX64ContainerTest : LinuxContainerTest<AlpineX64ContainerTestFixture>
{
public AlpineX64ContainerTest(AlpineX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

[Trait("Category", "arm64")]
[Trait("Architecture", "arm64")]
public class DebianArm64ContainerTest : LinuxContainerTest<DebianArm64ContainerTestFixture>
{
public DebianArm64ContainerTest(DebianArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

[Trait("Category", "arm64")]
[Trait("Architecture", "arm64")]
public class UbuntuArm64ContainerTest : LinuxContainerTest<UbuntuArm64ContainerTestFixture>
{
public UbuntuArm64ContainerTest(UbuntuArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class CentosX64ContainerTest : LinuxContainerTest<CentosX64ContainerTestFixture>
{
public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
Expand All @@ -98,39 +96,39 @@ public CentosX64ContainerTest(CentosX64ContainerTestFixture fixture, ITestOutput
}

// temporarily disabled until QEMU issue is resolved
//[Trait("Category", "arm64")]
//[Trait("Architecture", "arm64")]
//public class CentosArm64ContainerTest : LinuxContainerTest<CentosArm64ContainerTestFixture>
//{
// public CentosArm64ContainerTest(CentosArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
// {
// }
//}

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class AmazonX64ContainerTest : LinuxContainerTest<AmazonX64ContainerTestFixture>
{
public AmazonX64ContainerTest(AmazonX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

[Trait("Category", "arm64")]
[Trait("Architecture", "arm64")]
public class AmazonArm64ContainerTest : LinuxContainerTest<AmazonArm64ContainerTestFixture>
{
public AmazonArm64ContainerTest(AmazonArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class FedoraX64ContainerTest : LinuxContainerTest<FedoraX64ContainerTestFixture>
{
public FedoraX64ContainerTest(FedoraX64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

[Trait("Category", "arm64")]
[Trait("Architecture", "arm64")]
public class FedoraArm64ContainerTest : LinuxContainerTest<FedoraArm64ContainerTestFixture>
{
public FedoraArm64ContainerTest(FedoraArm64ContainerTestFixture fixture, ITestOutputHelper output) : base(fixture, output)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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.
/// </summary>
[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class LinuxUnicodeLogFileTest : NewRelicIntegrationTest<LinuxUnicodeLogFileTestFixture>
{
private readonly LinuxUnicodeLogFileTestFixture _fixture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -130,15 +128,15 @@ public void Test()
}
}

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class MemcachedDotNet8Test : LinuxMemcachedTest<MemcachedDotNet8TestFixture>
{
public MemcachedDotNet8Test(MemcachedDotNet8TestFixture fixture, ITestOutputHelper output) : base(fixture, output)
{
}
}

[Trait("Category", "amd64")]
[Trait("Architecture", "amd64")]
public class MemcachedDotNet9Test : LinuxMemcachedTest<MemcachedDotNet9TestFixture>
{
public MemcachedDotNet9Test(MemcachedDotNet9TestFixture fixture, ITestOutputHelper output) : base(fixture, output)
Expand Down

0 comments on commit 188c6ad

Please sign in to comment.