54 references to LogTestHelpers
Aspire.Dashboard.Tests (54)
Integration\FrontendBrowserTokenAuthTests.cs (15)
380Assert.Equal("Aspire dashboard version: {Version}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 384Assert.Equal("Now listening on: {DashboardUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 386var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardUri")!); 391Assert.Equal("OTLP/gRPC listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 393var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 398Assert.Equal("OTLP/HTTP listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 400var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 405Assert.Equal("OTLP server is unsecured. Untrusted apps can send telemetry to the dashboard. For more information, visit https://go.microsoft.com/fwlink/?linkid=2267030", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 410Assert.Equal("Dashboard API is unsecured. Untrusted apps can access sensitive telemetry data.", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 415Assert.Equal("Login to the dashboard at {LoginUrl}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 417var loginUrl = (string)LogTestHelpers.GetValue(w, "LoginUrl")!; 424Assert.StartsWith("Aspire Dashboard", (string)LogTestHelpers.GetValue(w, "{OriginalFormat}")!); 426var loginUrl = (string)LogTestHelpers.GetValue(w, "LoginUrl")!; 455var summaryLog = l.Single(w => ((string?)LogTestHelpers.GetValue(w, "{OriginalFormat}"))?.StartsWith("Aspire Dashboard") == true); 457var loginUrl = (string)LogTestHelpers.GetValue(summaryLog, "LoginUrl")!;
Integration\StartupTests.cs (26)
782Assert.Equal("Aspire dashboard version: {Version}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 786Assert.Equal("Now listening on: {DashboardUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 788var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardUri")!); 793Assert.Equal("OTLP/gRPC listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 795var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 800Assert.Equal("OTLP/HTTP listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 802var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 807Assert.Equal("OTLP server is unsecured. Untrusted apps can send telemetry to the dashboard. For more information, visit https://go.microsoft.com/fwlink/?linkid=2267030", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 812Assert.Equal("Dashboard API is unsecured. Untrusted apps can access sensitive telemetry data.", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 817Assert.StartsWith("Aspire Dashboard", (string)LogTestHelpers.GetValue(w, "{OriginalFormat}")!); 844Assert.Equal("Aspire dashboard version: {Version}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 848Assert.Equal("Now listening on: {DashboardUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 852Assert.Equal("Dashboard API is unsecured. Untrusted apps can access sensitive telemetry data.", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 857Assert.StartsWith("Aspire Dashboard", (string)LogTestHelpers.GetValue(w, "{OriginalFormat}")!); 903Assert.Contains(warnings, w => LogTestHelpers.GetValue(w, "{OriginalFormat}")?.ToString() == ApiUnsecuredWarning); 907Assert.DoesNotContain(warnings, w => LogTestHelpers.GetValue(w, "{OriginalFormat}")?.ToString() == ApiUnsecuredWarning); 964Assert.Equal("Aspire dashboard version: {Version}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 968Assert.Equal("Now listening on: {DashboardUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 970var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardUri")!); 977Assert.Equal("OTLP/gRPC listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 979var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 984Assert.Equal("OTLP/HTTP listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 986var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 991Assert.Equal("OTLP server is unsecured. Untrusted apps can send telemetry to the dashboard. For more information, visit https://go.microsoft.com/fwlink/?linkid=2267030", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 996Assert.Equal("Dashboard API is unsecured. Untrusted apps can access sensitive telemetry data.", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 1001Assert.StartsWith("Aspire Dashboard", (string)LogTestHelpers.GetValue(w, "{OriginalFormat}")!);
LoggingHelpersTests.cs (13)
31Assert.Equal("Login to the dashboard at {LoginUrl}", LogTestHelpers.GetValue(loginWrite, "{OriginalFormat}")); 32Assert.Equal("http://localhost:18888/login?t=abc123", LogTestHelpers.GetValue(loginWrite, "LoginUrl")); 48Assert.Equal("http://localhost:18888", LogTestHelpers.GetValue(write, "DashboardUrl")); 49Assert.Equal("http://localhost:18889", LogTestHelpers.GetValue(write, "OtlpGrpcUrl")); 50Assert.Equal("http://localhost:18890", LogTestHelpers.GetValue(write, "OtlpHttpUrl")); 51Assert.Equal("http://localhost:18888/login?t=abc123", LogTestHelpers.GetValue(write, "LoginUrl")); 80Assert.Null(LogTestHelpers.GetValue(write, "LoginUrl")); 129Assert.Null(LogTestHelpers.GetValue(write, "DashboardUrl")); 130Assert.Null(LogTestHelpers.GetValue(write, "LoginUrl")); 131Assert.Equal("http://localhost:18889", LogTestHelpers.GetValue(write, "OtlpGrpcUrl")); 132Assert.Equal("http://localhost:18890", LogTestHelpers.GetValue(write, "OtlpHttpUrl")); 193Assert.Null(LogTestHelpers.GetValue(write, "OtlpGrpcUrl")); 194Assert.Null(LogTestHelpers.GetValue(write, "OtlpHttpUrl"));