mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-27 09:35:38 -05:00
Fix handling some SQL Assessment warnings (#1114)
* Some new SQL Assessment warnings may have Check property set to null. Handle the warnings with no exception. * Make names of SQL Assessment test methods more informative.
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlAssessment
|
||||
{
|
||||
private delegate Task<List<TResult>> AssessmentMethod<TResult>(SqlObjectLocator locator);
|
||||
|
||||
private static readonly string[] AllowedSeverityLevels = { "Information", "Warning", "Critical" };
|
||||
private static readonly string[] AllowedSeverityLevels = { string.Empty, "Information", "Warning", "Critical" };
|
||||
|
||||
[Test]
|
||||
public async Task InvokeSqlAssessmentServerTest()
|
||||
@@ -56,7 +56,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlAssessment
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task GetAssessmentItemsServerTest()
|
||||
public async Task GetSqlAssessmentItemsServerTest()
|
||||
{
|
||||
var liveConnection = LiveConnectionHelper.InitLiveConnectionInfo("master");
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlAssessment
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task GetAssessmentItemsDatabaseTest()
|
||||
public async Task GetSqlAssessmentItemsDatabaseTest()
|
||||
{
|
||||
const string DatabaseName = "tempdb";
|
||||
var liveConnection = LiveConnectionHelper.InitLiveConnectionInfo(DatabaseName);
|
||||
@@ -214,9 +214,9 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlAssessment
|
||||
{
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
Assert.That(item.CheckId, Is.Not.Null.Or.Empty);
|
||||
Assert.That(item.DisplayName, Is.Not.Null.Or.Empty);
|
||||
Assert.That(item.Description, Is.Not.Null.Or.Empty);
|
||||
Assert.That(item.CheckId, Is.Not.Null);
|
||||
Assert.That(item.DisplayName, Is.Not.Null);
|
||||
Assert.That(item.Description, Is.Not.Null);
|
||||
Assert.NotNull(item.Tags);
|
||||
Assert.That(item.Tags, Has.All.Not.Null.Or.Empty);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user