mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Turn on disabled tests in integration suite (#120)
No real code changes, just reenabling disabled tests in integration test runs.
This commit is contained in:
@@ -145,11 +145,13 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices
|
|||||||
|
|
||||||
#region "General Language Service tests"
|
#region "General Language Service tests"
|
||||||
|
|
||||||
|
|
||||||
|
#if LIVE_CONNECTION_TESTS
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Test the service initialization code path and verify nothing throws
|
/// Test the service initialization code path and verify nothing throws
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// Test is causing failures in build lab..investigating to reenable
|
// Test is causing failures in build lab..investigating to reenable
|
||||||
//[Fact]
|
[Fact]
|
||||||
public void ServiceInitiailzation()
|
public void ServiceInitiailzation()
|
||||||
{
|
{
|
||||||
InitializeTestServices();
|
InitializeTestServices();
|
||||||
@@ -167,7 +169,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices
|
|||||||
/// Test the service initialization code path and verify nothing throws
|
/// Test the service initialization code path and verify nothing throws
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// Test is causing failures in build lab..investigating to reenable
|
// Test is causing failures in build lab..investigating to reenable
|
||||||
//[Fact]
|
[Fact]
|
||||||
public void PrepopulateCommonMetadata()
|
public void PrepopulateCommonMetadata()
|
||||||
{
|
{
|
||||||
InitializeTestServices();
|
InitializeTestServices();
|
||||||
@@ -194,6 +196,31 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices
|
|||||||
AutoCompleteHelper.PrepopulateCommonMetadata(connInfo, scriptInfo, null);
|
AutoCompleteHelper.PrepopulateCommonMetadata(connInfo, scriptInfo, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This test currently requires a live database connection to initialize
|
||||||
|
// SMO connected metadata provider. Since we don't want a live DB dependency
|
||||||
|
// in the CI unit tests this scenario is currently disabled.
|
||||||
|
[Fact]
|
||||||
|
public void AutoCompleteFindCompletions()
|
||||||
|
{
|
||||||
|
TextDocumentPosition textDocument;
|
||||||
|
ConnectionInfo connInfo;
|
||||||
|
ScriptFile scriptFile;
|
||||||
|
Common.GetAutoCompleteTestObjects(out textDocument, out scriptFile, out connInfo);
|
||||||
|
|
||||||
|
textDocument.Position.Character = 7;
|
||||||
|
scriptFile.Contents = "select ";
|
||||||
|
|
||||||
|
var autoCompleteService = LanguageService.Instance;
|
||||||
|
var completions = autoCompleteService.GetCompletionItems(
|
||||||
|
textDocument,
|
||||||
|
scriptFile,
|
||||||
|
connInfo);
|
||||||
|
|
||||||
|
Assert.True(completions.Length > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
private string GetTestSqlFile()
|
private string GetTestSqlFile()
|
||||||
{
|
{
|
||||||
string filePath = Path.Combine(
|
string filePath = Path.Combine(
|
||||||
@@ -255,29 +282,6 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.LanguageServices
|
|||||||
|
|
||||||
#region "Autocomplete Tests"
|
#region "Autocomplete Tests"
|
||||||
|
|
||||||
// This test currently requires a live database connection to initialize
|
|
||||||
// SMO connected metadata provider. Since we don't want a live DB dependency
|
|
||||||
// in the CI unit tests this scenario is currently disabled.
|
|
||||||
//[Fact]
|
|
||||||
public void AutoCompleteFindCompletions()
|
|
||||||
{
|
|
||||||
TextDocumentPosition textDocument;
|
|
||||||
ConnectionInfo connInfo;
|
|
||||||
ScriptFile scriptFile;
|
|
||||||
Common.GetAutoCompleteTestObjects(out textDocument, out scriptFile, out connInfo);
|
|
||||||
|
|
||||||
textDocument.Position.Character = 7;
|
|
||||||
scriptFile.Contents = "select ";
|
|
||||||
|
|
||||||
var autoCompleteService = LanguageService.Instance;
|
|
||||||
var completions = autoCompleteService.GetCompletionItems(
|
|
||||||
textDocument,
|
|
||||||
scriptFile,
|
|
||||||
connInfo);
|
|
||||||
|
|
||||||
Assert.True(completions.Length > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a mock db command that returns a predefined result set
|
/// Creates a mock db command that returns a predefined result set
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user