Skip to content

Commit 079e583

Browse files
committed
Fix test issue
1 parent e0e3fd6 commit 079e583

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/Unit/PowerShell/PowerShellManagerTests.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,16 @@ internal void SuppressPipelineTracesForOpenAIAssistantSkillTrigger(string inputB
425425

426426
var path = Path.Join(s_funcDirectory, "testFunctionWithOutput.ps1");
427427

428+
BindingInfo bindingInfo = null;
429+
string oldBindingType = "";
428430
foreach(var binding in s_functionLoadRequest.Metadata.Bindings)
429431
{
430432
if (binding.Value.Direction == BindingInfo.Types.Direction.In)
431433
{
434+
bindingInfo = binding.Value;
435+
oldBindingType = binding.Value.Type;
432436
binding.Value.Type = inputBindingType;
437+
break;
433438
}
434439
}
435440

@@ -448,6 +453,10 @@ internal void SuppressPipelineTracesForOpenAIAssistantSkillTrigger(string inputB
448453
finally
449454
{
450455
FunctionMetadata.UnregisterFunctionMetadata(testManager.InstanceId);
456+
if (bindingInfo != null)
457+
{
458+
bindingInfo.Type = oldBindingType;
459+
}
451460
}
452461
}
453462

0 commit comments

Comments
 (0)