dotnet-architecture / HealthChecks

Experimental Health Checks for building services, such as with ASP.NET Core
Other
453 stars 124 forks source link

Health check for Table Storage fails when table name is not provided #73

Open ben-m-lucas opened 6 years ago

ben-m-lucas commented 6 years ago

There is a bug in AzureHealthCheckBuilderExtensions.AddAzureTableStorageCheck where the health check fails if a table name is not provided because it attempts to get a table with a "null" name.

Likewise, if the name is passed in, the health check fails to actually check that the table exists.

Lines 73-78 currently read:

                    if (String.IsNullOrWhiteSpace(tableName))
                    {
                        var table = tableClient.GetTableReference(tableName);

                        result = await table.ExistsAsync();
                    }

Line 73 should be: if (!String.IsNullOrWhiteSpace(tableName))

mnadeau2 commented 6 years ago

any news about this issue ?