From d7e357e38ed9edd169048fb7d44f78f8e2a082b0 Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Fri, 15 Sep 2023 21:03:25 +0200 Subject: [PATCH] fix the tests --- ...ealthChecks.Azure.Data.Tables.approved.txt | 20 +++++++++++++++++++ ...Checks.Azure.KeyVault.Secrets.approved.txt | 16 +++++++-------- ...lthChecks.Azure.Storage.Blobs.approved.txt | 20 +++++++++++++++++++ ...ks.Azure.Storage.Files.Shares.approved.txt | 20 +++++++++++++++++++ ...thChecks.Azure.Storage.Queues.approved.txt | 20 +++++++++++++++++++ 5 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 test/HealthChecks.Azure.Data.Tables.Tests/HealthChecks.Azure.Data.Tables.approved.txt create mode 100644 test/HealthChecks.Azure.Storage.Blobs.Tests/HealthChecks.Azure.Storage.Blobs.approved.txt create mode 100644 test/HealthChecks.Azure.Storage.Files.Shares.Tests/HealthChecks.Azure.Storage.Files.Shares.approved.txt create mode 100644 test/HealthChecks.Azure.Storage.Queues.Tests/HealthChecks.Azure.Storage.Queues.approved.txt diff --git a/test/HealthChecks.Azure.Data.Tables.Tests/HealthChecks.Azure.Data.Tables.approved.txt b/test/HealthChecks.Azure.Data.Tables.Tests/HealthChecks.Azure.Data.Tables.approved.txt new file mode 100644 index 0000000000..450df022aa --- /dev/null +++ b/test/HealthChecks.Azure.Data.Tables.Tests/HealthChecks.Azure.Data.Tables.approved.txt @@ -0,0 +1,20 @@ +namespace HealthChecks.CosmosDb +{ + public sealed class AzureTableServiceHealthCheck : Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck + { + public AzureTableServiceHealthCheck(Azure.Data.Tables.TableServiceClient tableServiceClient, HealthChecks.CosmosDb.AzureTableServiceHealthCheckOptions? options) { } + public System.Threading.Tasks.Task CheckHealthAsync(Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext context, System.Threading.CancellationToken cancellationToken = default) { } + } + public sealed class AzureTableServiceHealthCheckOptions + { + public AzureTableServiceHealthCheckOptions() { } + public string? TableName { get; set; } + } +} +namespace Microsoft.Extensions.DependencyInjection +{ + public static class AzureTablesServiceHealthChecksBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAzureTable(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, System.Func? clientFactory = null, System.Func? optionsFactory = null, string? healthCheckName = "azure_tables", Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } + } +} \ No newline at end of file diff --git a/test/HealthChecks.Azure.KeyVault.Secrets.Tests/HealthChecks.Azure.KeyVault.Secrets.approved.txt b/test/HealthChecks.Azure.KeyVault.Secrets.Tests/HealthChecks.Azure.KeyVault.Secrets.approved.txt index a849bcead7..a2d55e42eb 100644 --- a/test/HealthChecks.Azure.KeyVault.Secrets.Tests/HealthChecks.Azure.KeyVault.Secrets.approved.txt +++ b/test/HealthChecks.Azure.KeyVault.Secrets.Tests/HealthChecks.Azure.KeyVault.Secrets.approved.txt @@ -1,21 +1,21 @@ namespace HealthChecks.Azure.KeyVault.Secrets { - public sealed class AzureKeyVaultSecretOptions - { - public AzureKeyVaultSecretOptions() { } - public bool CreateWhenNotFound { get; set; } - public string SecretName { get; set; } - } public sealed class AzureKeyVaultSecretsHealthCheck : Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck { - public AzureKeyVaultSecretsHealthCheck(Azure.Security.KeyVault.Secrets.SecretClient secretClient, HealthChecks.Azure.KeyVault.Secrets.AzureKeyVaultSecretOptions options) { } + public AzureKeyVaultSecretsHealthCheck(Azure.Security.KeyVault.Secrets.SecretClient secretClient, HealthChecks.Azure.KeyVault.Secrets.AzureKeyVaultSecretsHealthCheckOptions? options = null) { } public System.Threading.Tasks.Task CheckHealthAsync(Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext context, System.Threading.CancellationToken cancellationToken = default) { } } + public sealed class AzureKeyVaultSecretsHealthCheckOptions + { + public AzureKeyVaultSecretsHealthCheckOptions() { } + public bool CreateWhenNotFound { get; set; } + public string SecretName { get; set; } + } } namespace Microsoft.Extensions.DependencyInjection { public static class AzureKeyVaultHealthChecksBuilderExtensions { - public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAzureKeyVaultSecrets(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, System.Func? secretClientFactory = null, System.Func? optionsFactory = null, string? healthCheckName = null, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAzureKeyVaultSecrets(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, System.Func? clientFactory = null, System.Func? optionsFactory = null, string? healthCheckName = "azure_key_vault_secret", Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } } } \ No newline at end of file diff --git a/test/HealthChecks.Azure.Storage.Blobs.Tests/HealthChecks.Azure.Storage.Blobs.approved.txt b/test/HealthChecks.Azure.Storage.Blobs.Tests/HealthChecks.Azure.Storage.Blobs.approved.txt new file mode 100644 index 0000000000..9a18ae882b --- /dev/null +++ b/test/HealthChecks.Azure.Storage.Blobs.Tests/HealthChecks.Azure.Storage.Blobs.approved.txt @@ -0,0 +1,20 @@ +namespace HealthChecks.AzureStorage +{ + public sealed class AzureBlobStorageHealthCheck : Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck + { + public AzureBlobStorageHealthCheck(Azure.Storage.Blobs.BlobServiceClient blobServiceClient, HealthChecks.AzureStorage.AzureBlobStorageHealthCheckOptions? options = null) { } + public System.Threading.Tasks.Task CheckHealthAsync(Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext context, System.Threading.CancellationToken cancellationToken = default) { } + } + public sealed class AzureBlobStorageHealthCheckOptions + { + public AzureBlobStorageHealthCheckOptions() { } + public string? ContainerName { get; set; } + } +} +namespace Microsoft.Extensions.DependencyInjection +{ + public static class AzureBlobStorageHealthChecksBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAzureBlobStorage(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, System.Func? clientFactory = null, System.Func? optionsFactory = null, string? healthCheckName = "azure_blob_storage", Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } + } +} \ No newline at end of file diff --git a/test/HealthChecks.Azure.Storage.Files.Shares.Tests/HealthChecks.Azure.Storage.Files.Shares.approved.txt b/test/HealthChecks.Azure.Storage.Files.Shares.Tests/HealthChecks.Azure.Storage.Files.Shares.approved.txt new file mode 100644 index 0000000000..bd2e2494a5 --- /dev/null +++ b/test/HealthChecks.Azure.Storage.Files.Shares.Tests/HealthChecks.Azure.Storage.Files.Shares.approved.txt @@ -0,0 +1,20 @@ +namespace HealthChecks.AzureStorage +{ + public sealed class AzureFileShareHealthCheck : Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck + { + public AzureFileShareHealthCheck(Azure.Storage.Files.Shares.ShareServiceClient shareServiceClient, HealthChecks.AzureStorage.AzureFileShareHealthCheckOptions? options) { } + public System.Threading.Tasks.Task CheckHealthAsync(Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext context, System.Threading.CancellationToken cancellationToken = default) { } + } + public sealed class AzureFileShareHealthCheckOptions + { + public AzureFileShareHealthCheckOptions() { } + public string? ShareName { get; set; } + } +} +namespace Microsoft.Extensions.DependencyInjection +{ + public static class AzureFileShareStorageHealthChecksBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAzureFileShare(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, System.Func? clientFactory = null, System.Func? optionsFactory = null, string? healthCheckName = "azure_file_share", Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } + } +} \ No newline at end of file diff --git a/test/HealthChecks.Azure.Storage.Queues.Tests/HealthChecks.Azure.Storage.Queues.approved.txt b/test/HealthChecks.Azure.Storage.Queues.Tests/HealthChecks.Azure.Storage.Queues.approved.txt new file mode 100644 index 0000000000..ca21c3d296 --- /dev/null +++ b/test/HealthChecks.Azure.Storage.Queues.Tests/HealthChecks.Azure.Storage.Queues.approved.txt @@ -0,0 +1,20 @@ +namespace HealthChecks.AzureStorage +{ + public sealed class AzureQueueStorageHealthCheck : Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck + { + public AzureQueueStorageHealthCheck(Azure.Storage.Queues.QueueServiceClient queueServiceClient, HealthChecks.AzureStorage.AzureQueueStorageHealthCheckOptions? options = null) { } + public System.Threading.Tasks.Task CheckHealthAsync(Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext context, System.Threading.CancellationToken cancellationToken = default) { } + } + public sealed class AzureQueueStorageHealthCheckOptions + { + public AzureQueueStorageHealthCheckOptions() { } + public string? QueueName { get; set; } + } +} +namespace Microsoft.Extensions.DependencyInjection +{ + public static class AzureQueueStorageHealthChecksBuilderExtensions + { + public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddAzureQueueStorage(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, System.Func? clientFactory = null, System.Func? optionsFactory = null, string? healthCheckName = "azure_queue_storage", Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } + } +} \ No newline at end of file