Skip to content

Update unit test for .NET Monitor filter environment variables #2854

Closed

Description

@mthalman

The .NET Monitor Dockerfile now sets two environment variables:

  • DotnetMonitor_DefaultProcess__Filters__0__Key
  • DotnetMonitor_DefaultProcess__Filters__0__Value

A unit test should be updated to ensure that these new environment variables are set within the built image:

public void VerifyEnvironmentVariables(MonitorImageData imageData)
{
List<EnvironmentVariableInfo> variables = new List<EnvironmentVariableInfo>();
variables.AddRange(ProductImageTests.GetCommonEnvironmentVariables());
// ASPNETCORE_URLS has been unset to allow the default URL binding to occur.
variables.Add(new EnvironmentVariableInfo("ASPNETCORE_URLS", string.Empty));
// Diagnostics should be disabled
variables.Add(new EnvironmentVariableInfo("COMPlus_EnableDiagnostics", "0"));
EnvironmentVariableInfo.Validate(
variables,
imageData.GetImage(DockerHelper),
imageData,
DockerHelper);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions