Skip to content

Commit

Permalink
test: Reduce APM service name proliferation in container tests (#2170)
Browse files Browse the repository at this point in the history
  • Loading branch information
tippmar-nr committed Jan 5, 2024
1 parent eb8fa7e commit 6477a2b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ public ContainerApplication(string distroTag, Architecture containerArchitecture
}
}

public override string AppName => $"ContainerTestApp_{_dotnetVersion}-{_distroTag}_{_targetArch}_{_randomId}";
public string NRAppName =>$"ContainerTestApp_{_dotnetVersion}-{_distroTag}_{_targetArch}";

public override string AppName => $"{NRAppName}_{_randomId}";

private string ContainerName => AppName.ToLower().Replace(".", "_"); // must be lowercase, can't have any periods in it

Expand Down Expand Up @@ -123,7 +125,7 @@ public override void Start(string commandLineArguments, Dictionary<string, strin
var testConfiguration = IntegrationTestConfiguration.GetIntegrationTestConfiguration("Default");

startInfo.EnvironmentVariables.Add("TEST_DOCKERFILE", _dockerfile);
startInfo.EnvironmentVariables.Add("NEW_RELIC_APP_NAME", AppName);
startInfo.EnvironmentVariables.Add("NEW_RELIC_APP_NAME", NRAppName);
startInfo.EnvironmentVariables.Add("DOTNET_VERSION", _dotnetVersion);
startInfo.EnvironmentVariables.Add("APP_DOTNET_VERSION", _dotnetVersion);
startInfo.EnvironmentVariables.Add("DISTRO_TAG", _distroTag);
Expand Down

0 comments on commit 6477a2b

Please sign in to comment.