4094 Kusto AAD Authentication Refactor (#1115)

* 4094 Upgraded Kusto.Data and Kusto.Language to 9.0.3. Refactored KustoServiceLayer to use KustoConnectionStringBuilder instead of Sql.

* 4094 Refactored KustoClient>Initialize to take connectionString as optional. Removed unused properties from ConnectionService>ParseConnectionString

* 4094 Updated Kusto.Data and Kusto.Language nuget packages to 9.0.4. Removed IsDedicatedAdminConnection function in ConnectionService.

* 4094 Fixed unit tests
This commit is contained in:
Justin M
2020-11-20 11:54:40 -08:00
committed by GitHub
parent 67c7e20c13
commit fd84367008
13 changed files with 65 additions and 301 deletions

View File

@@ -61,7 +61,7 @@ namespace Microsoft.Kusto.ServiceLayer.UnitTests.DataSource
var semanticMarkers = DataSourceFactory.GetDefaultSemanticMarkers(DataSourceType.Kusto, parseInfo, file, queryText);
Assert.AreNotEqual(0, semanticMarkers.Length);
Assert.AreEqual(0, semanticMarkers.Length);
}
[Test]

View File

@@ -65,7 +65,7 @@ namespace Microsoft.Kusto.ServiceLayer.UnitTests.DataSource.DataSourceIntellisen
var queryText = ".show databases";
var completionItems = KustoIntellisenseHelper.GetDefaultDiagnostics(parseInfo, scriptFile, queryText);
Assert.AreEqual(6, completionItems.Length);
Assert.AreEqual(0, completionItems.Length);
}
}
}

View File

@@ -86,11 +86,14 @@ namespace Microsoft.Kusto.ServiceLayer.UnitTests.LanguageServices
Assert.AreEqual("NULL_NULL_NULL_NULL", connectionKey);
}
[TestCase(false)]
public void AddConnectionContext_Sets_BindingContext(bool needsMetadata)
[Test]
public void AddConnectionContext_Sets_BindingContext()
{
var connectionDetails = new ConnectionDetails();
var connectionDetails = new ConnectionDetails
{
AzureAccountToken = "AzureAccountToken"
};
var connectionFactory = new Mock<IDataSourceConnectionFactory>();
var connectionInfo = new ConnectionInfo(connectionFactory.Object, "ownerUri", connectionDetails);
@@ -103,7 +106,7 @@ namespace Microsoft.Kusto.ServiceLayer.UnitTests.LanguageServices
var connectedBindingQueue =
new ConnectedBindingQueue(dataSourceFactory.Object);
var connectionKey =
connectedBindingQueue.AddConnectionContext(connectionInfo, needsMetadata, "featureName");
connectedBindingQueue.AddConnectionContext(connectionInfo, false, "featureName");
var bindingContext = connectedBindingQueue.GetOrCreateBindingContext(connectionKey);
Assert.AreEqual(dataSourceMock.Object, bindingContext.DataSource);