Skip to content

Commit

Permalink
Fix telemetry tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Jan 23, 2024
1 parent 57043a3 commit 761b4cc
Showing 1 changed file with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public async Task Telemetry_ByDefault_TelemetryIsEnabled(string tfm)

string diagContentsPattern =
"""
\[.* - Information\] TestApplicationOptions.EnableTelemetry: True
\[.* - Information\] TESTINGPLATFORM_TELEMETRY_OPTOUT environment variable: ''
\[.* - Information\] DOTNET_CLI_TELEMETRY_OPTOUT environment variable: ''
\[.* - Information\] TESTINGPLATFORM_NOBANNER environment variable: ''
\[.* - Information\] DOTNET_NOLOGO environment variable: ''
\[.* - Information\] Telemetry is 'ENABLED'
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TestApplicationOptions.EnableTelemetry: True
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TESTINGPLATFORM_TELEMETRY_OPTOUT environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION DOTNET_CLI_TELEMETRY_OPTOUT environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TESTINGPLATFORM_NOBANNER environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION DOTNET_NOLOGO environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION Telemetry is 'ENABLED'
""";
await AssertDiagnosticReportAsync(testHostResult, diagPathPattern, diagContentsPattern);
}
Expand All @@ -64,12 +64,12 @@ public async Task Telemetry_WhenOptingOutTelemetry_WithEnvironmentVariable_Telem

string diagContentsPattern =
"""
\[.* - Information\] TestApplicationOptions.EnableTelemetry: True
\[.* - Information\] TESTINGPLATFORM_TELEMETRY_OPTOUT environment variable: '1'
\[.* - Information\] DOTNET_CLI_TELEMETRY_OPTOUT environment variable: ''
\[.* - Information\] TESTINGPLATFORM_NOBANNER environment variable: ''
\[.* - Information\] DOTNET_NOLOGO environment variable: ''
\[.* - Information\] Telemetry is 'DISABLED'
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TestApplicationOptions.EnableTelemetry: True
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TESTINGPLATFORM_TELEMETRY_OPTOUT environment variable: '1'
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION DOTNET_CLI_TELEMETRY_OPTOUT environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TESTINGPLATFORM_NOBANNER environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION DOTNET_NOLOGO environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION Telemetry is 'DISABLED'
""";
await AssertDiagnosticReportAsync(testHostResult, diagPathPattern, diagContentsPattern);
}
Expand All @@ -93,12 +93,12 @@ public async Task Telemetry_WhenOptingOutTelemetry_With_DOTNET_CLI_EnvironmentVa

string diagContentsPattern =
"""
\[.* - Information\] TestApplicationOptions.EnableTelemetry: True
\[.* - Information\] TESTINGPLATFORM_TELEMETRY_OPTOUT environment variable: ''
\[.* - Information\] DOTNET_CLI_TELEMETRY_OPTOUT environment variable: '1'
\[.* - Information\] TESTINGPLATFORM_NOBANNER environment variable: ''
\[.* - Information\] DOTNET_NOLOGO environment variable: ''
\[.* - Information\] Telemetry is 'DISABLED'
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TestApplicationOptions.EnableTelemetry: True
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TESTINGPLATFORM_TELEMETRY_OPTOUT environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION DOTNET_CLI_TELEMETRY_OPTOUT environment variable: '1'
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TESTINGPLATFORM_NOBANNER environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION DOTNET_NOLOGO environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION Telemetry is 'DISABLED'
""";
await AssertDiagnosticReportAsync(testHostResult, diagPathPattern, diagContentsPattern);
}
Expand All @@ -116,12 +116,12 @@ public async Task Telemetry_WhenEnableTelemetryIsFalse_WithTestApplicationOption

string diagContentsPattern =
"""
\[.* - Information\] TestApplicationOptions.EnableTelemetry: False
\[.* - Information\] TESTINGPLATFORM_TELEMETRY_OPTOUT environment variable: ''
\[.* - Information\] DOTNET_CLI_TELEMETRY_OPTOUT environment variable: ''
\[.* - Information\] TESTINGPLATFORM_NOBANNER environment variable: ''
\[.* - Information\] DOTNET_NOLOGO environment variable: ''
\[.* - Information\] Telemetry is 'DISABLED'
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TestApplicationOptions.EnableTelemetry: False
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TESTINGPLATFORM_TELEMETRY_OPTOUT environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION DOTNET_CLI_TELEMETRY_OPTOUT environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION TESTINGPLATFORM_NOBANNER environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION DOTNET_NOLOGO environment variable: ''
.+ Microsoft.Testing.Platform.Telemetry.TelemetryManager INFORMATION Telemetry is 'DISABLED'
""";
await AssertDiagnosticReportAsync(testHostResult, diagPathPattern, diagContentsPattern);
}
Expand Down

0 comments on commit 761b4cc

Please sign in to comment.