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)
739Assert.Equal("Aspire dashboard version: {Version}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 743Assert.Equal("Now listening on: {DashboardUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 745var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardUri")!); 750Assert.Equal("OTLP/gRPC listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 752var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 757Assert.Equal("OTLP/HTTP listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 759var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 764Assert.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}")); 769Assert.Equal("Dashboard API is unsecured. Untrusted apps can access sensitive telemetry data.", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 774Assert.StartsWith("Aspire Dashboard", (string)LogTestHelpers.GetValue(w, "{OriginalFormat}")!); 801Assert.Equal("Aspire dashboard version: {Version}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 805Assert.Equal("Now listening on: {DashboardUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 809Assert.Equal("Dashboard API is unsecured. Untrusted apps can access sensitive telemetry data.", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 814Assert.StartsWith("Aspire Dashboard", (string)LogTestHelpers.GetValue(w, "{OriginalFormat}")!); 860Assert.Contains(warnings, w => LogTestHelpers.GetValue(w, "{OriginalFormat}")?.ToString() == ApiUnsecuredWarning); 864Assert.DoesNotContain(warnings, w => LogTestHelpers.GetValue(w, "{OriginalFormat}")?.ToString() == ApiUnsecuredWarning); 921Assert.Equal("Aspire dashboard version: {Version}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 925Assert.Equal("Now listening on: {DashboardUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 927var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardUri")!); 934Assert.Equal("OTLP/gRPC listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 936var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 941Assert.Equal("OTLP/HTTP listening on: {OtlpEndpointUri}", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 943var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 948Assert.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}")); 953Assert.Equal("Dashboard API is unsecured. Untrusted apps can access sensitive telemetry data.", LogTestHelpers.GetValue(w, "{OriginalFormat}")); 958Assert.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"));