2 writes to FailureMessage
Microsoft.Extensions.Options (2)
ValidateOptionsResult.cs (2)
64=> new ValidateOptionsResult { Failed = true, FailureMessage = failureMessage, Failures = new string[] { failureMessage } }; 72=> new ValidateOptionsResult { Failed = true, FailureMessage = string.Join("; ", failures), Failures = failures };
39 references to FailureMessage
Aspire.Dashboard.Tests (18)
DashboardOptionsTests.cs (18)
35Assert.Null(result.FailureMessage); 50Assert.Equal("One or more frontend endpoint URLs are not configured. Specify an ASPNETCORE_URLS value.", result.FailureMessage); 62Assert.Equal("Failed to parse frontend endpoint URLs 'invalid'.", result.FailureMessage); 74Assert.Equal("Failed to parse frontend endpoint URLs 'http://localhost:5000;invalid'.", result.FailureMessage); 88Assert.Equal($"{DashboardConfigNames.DashboardFrontendMaxConsoleLogCountName.ConfigKey} must be greater than zero.", result.FailureMessage); 104Assert.Equal("Failed to parse resource service client endpoint URL 'invalid'.", result.FailureMessage); 118Assert.Equal($"{DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey} is \"{nameof(ResourceClientAuthMode.ApiKey)}\", but no {DashboardConfigNames.ResourceServiceClientApiKeyName.ConfigKey} is configured.", result.FailureMessage); 133Assert.Equal($"{DashboardConfigNames.ResourceServiceClientCertificateSourceName.ConfigKey} is \"File\", but no {DashboardConfigNames.ResourceServiceClientCertificateFilePathName.ConfigKey} is configured.", result.FailureMessage); 148Assert.Equal($"{DashboardConfigNames.ResourceServiceClientCertificateSourceName.ConfigKey} is \"KeyStore\", but no {DashboardConfigNames.ResourceServiceClientCertificateSubjectName.ConfigKey} is configured.", result.FailureMessage); 162Assert.Equal($"The resource service client is configured to use certificates, but no certificate source is specified. Specify {DashboardConfigNames.ResourceServiceClientCertificateSourceName.ConfigKey}. Possible values: {string.Join(", ", typeof(DashboardClientCertificateSource).GetEnumNames())}", result.FailureMessage); 176Assert.Equal($"Unexpected resource service client certificate source: {options.ResourceServiceClient.ClientCertificate.Source}", result.FailureMessage); 189Assert.Equal($"Resource service client authentication is not configured. Specify {DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey}. Possible values: {string.Join(", ", typeof(ResourceClientAuthMode).GetEnumNames())}", result.FailureMessage); 202Assert.Equal($"Unexpected resource service client authentication mode: {int.MaxValue}", result.FailureMessage); 221result.FailureMessage); 233Assert.Equal("Failed to parse OTLP gRPC endpoint URL 'invalid'.", result.FailureMessage); 245Assert.Equal("Failed to parse OTLP HTTP endpoint URL 'invalid'.", result.FailureMessage); 262Assert.Equal("OpenID Connect claim type for name not configured. Specify a Dashboard:Frontend:OpenIdConnect:NameClaimType value.", result.FailureMessage); 275Assert.Equal("OpenID Connect claim type for username not configured. Specify a Dashboard:Frontend:OpenIdConnect:UsernameClaimType value.", result.FailureMessage);
Aspire.Hosting.Tests (16)
Dashboard\TransportOptionsValidatorTests.cs (16)
28result.FailureMessage 45Assert.True(result.Succeeded, result.FailureMessage); 63Assert.True(result.Succeeded, result.FailureMessage); 81Assert.True(result.Succeeded, result.FailureMessage); 101result.FailureMessage 120result.FailureMessage 140result.FailureMessage 162result.FailureMessage 184result.FailureMessage 207result.FailureMessage 232result.FailureMessage 256result.FailureMessage 278result.FailureMessage 295Assert.True(result.Succeeded, result.FailureMessage); 311Assert.True(result.Succeeded, result.FailureMessage); 329Assert.True(result.Succeeded, result.FailureMessage);
Microsoft.Extensions.Compliance.Testing.Tests (3)
FakeRedactorOptionsValidatorTests.cs (3)
23Assert.Contains(nameof(FakeRedactorOptions.RedactionFormat), validationResult.FailureMessage); 42Assert.True(validationResult.Failed, validationResult.FailureMessage); 43Assert.Contains(nameof(options.RedactionFormat), validationResult.FailureMessage);
Microsoft.Extensions.Options (2)
ValidateOptionsResult.cs (1)
45[MemberNotNullWhen(true, nameof(FailureMessage))]
ValidateOptionsResultBuilder.cs (1)
80Errors.Add(result.FailureMessage);