Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
colombod committed Feb 16, 2023
1 parent 4687c53 commit 2699006
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public async Task It_gives_error_if_kernel_name_is_already_used()

result.Events
.Should()
.ContainSingle<CommandFailed>();
.NotContainErrors();

result = await kernel.SubmitCodeAsync($"#!connect kql --kernel-name KustoHelp --cluster \"{cluster}\" --database \"Samples\"");

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.DotNet.Interactive.Kql/ConnectKqlCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public ConnectKqlCommand(string resolvedToolsServicePath)

var localName = commandLineContext.ParseResult.GetValueForOption(KernelNameOption);

var found = context?.HandlingKernel?.RootKernel.FindKernelByName(localName) == null;
var found = context?.HandlingKernel?.RootKernel.FindKernelByName($"kql-{localName}") is not null;

if (found)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public async Task It_gives_error_if_kernel_name_is_already_used()

result.Events
.Should()
.ContainSingle<CommandFailed>();
.NotContainErrors();

result = await kernel.SubmitCodeAsync(
$"#!connect mssql --kernel-name adventureworks \"{connectionString}\"");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ConnectMsSqlCommand(string resolvedToolsServicePath)

var localName = commandLineContext.ParseResult.GetValueForOption(KernelNameOption);

var found = context?.HandlingKernel?.RootKernel.FindKernelByName(localName) == null;
var found = context?.HandlingKernel?.RootKernel.FindKernelByName($"sql-{localName}") is not null;

if (found)
{
Expand Down

0 comments on commit 2699006

Please sign in to comment.