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)
696Assert.Equal("Aspire dashboard version: {Version}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 700Assert.Equal("Now listening on: {DashboardUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 702var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardUri")!); 707Assert.Equal("OTLP/gRPC listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 709var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 714Assert.Equal("OTLP/HTTP listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 716var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 721Assert.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}")); 726Assert.Equal("Dashboard API is unsecured. Untrusted apps can access sensitive telemetry data.", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 731Assert.StartsWith("Aspire Dashboard", (string)LogTestHelpers.GetValue(w, "{OriginalFormat}")!); 758Assert.Equal("Aspire dashboard version: {Version}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 762Assert.Equal("Now listening on: {DashboardUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 766Assert.Equal("Dashboard API is unsecured. Untrusted apps can access sensitive telemetry data.", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 771Assert.StartsWith("Aspire Dashboard", (string)LogTestHelpers.GetValue(w, "{OriginalFormat}")!); 817Assert.Contains(warnings, w => LogTestHelpers.GetValue(w, "{OriginalFormat}")?.ToString() == ApiUnsecuredWarning); 821Assert.DoesNotContain(warnings, w => LogTestHelpers.GetValue(w, "{OriginalFormat}")?.ToString() == ApiUnsecuredWarning); 878Assert.Equal("Aspire dashboard version: {Version}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 882Assert.Equal("Now listening on: {DashboardUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 884var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardUri")!); 891Assert.Equal("OTLP/gRPC listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 893var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 898Assert.Equal("OTLP/HTTP listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 900var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 905Assert.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}")); 910Assert.Equal("Dashboard API is unsecured. Untrusted apps can access sensitive telemetry data.", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 915Assert.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"));