From 761b4ccc49351b2e319d974acd72ebe5a33c1923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Tue, 23 Jan 2024 20:02:46 +0100 Subject: [PATCH] Fix telemetry tests --- .../TelemetryTests.cs | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs index abb4bda89c..3d2395551b 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs @@ -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); } @@ -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); } @@ -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); } @@ -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); }