Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 1.12.0 (18th July 2025)

LogicAppUnit Testing Framework:

- HTTP actions with the authentication type set to `ManagedServiceIdentity` are updated to use the `None` authentication type. [[Issue #49](https://github.com/LogicAppUnit/TestingFramework/issues/49)], [[Issue #50](https://github.com/LogicAppUnit/TestingFramework/issues/50)] and [[PR #51](https://github.com/LogicAppUnit/TestingFramework/pull/51), [@ronaldbosma ](https://github.com/ronaldbosma)]


LogicAppUnit.Samples.LogicApps.Tests:

- Added a `http-with-managed-identity-workflow` workflow and unit test to test a workflow that includes a HTTP action with the authentication type set to `ManagedServiceIdentity`.


# 1.11.0 (11th April 2025)

LogicAppUnit Testing Framework:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using LogicAppUnit.Mocking;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using LogicAppUnit.Helper;
using LogicAppUnit.Mocking;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace LogicAppUnit.Samples.LogicApps.Tests.HttpWithManagedIdentityWorkflow
{
Expand Down
2 changes: 1 addition & 1 deletion src/LogicAppUnit/LogicAppUnit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>LogicAppUnit</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Version>1.11.0</Version>
<Version>1.12.0</Version>
<Title>Logic App Unit Testing Framework</Title>
<Description>Unit testing framework for Standard Logic Apps.</Description>
<RepositoryUrl>https://github.com/LogicAppUnit/TestingFramework</RepositoryUrl>
Expand Down
16 changes: 11 additions & 5 deletions src/LogicAppUnit/Wrapper/WorkflowDefinitionWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,10 @@ public void ReplaceBuiltInConnectorActionsWithHttp(List<string> builtInConnector
/// </remarks>
public void RemoveHttpChunkingConfiguration()
{
var httpActionsWithChunking = _jObjectWorkflow.SelectTokens("$..actions.*").Where(x => x["type"].ToString() == "Http")
.Where(x => x["runtimeConfiguration"]?["contentTransfer"]?["transferMode"].ToString() == "Chunked").Select(x => x["runtimeConfiguration"] as JObject).ToList();
var httpActionsWithChunking = _jObjectWorkflow.SelectTokens("$..actions.*")
.Where(x => x["type"].ToString() == "Http")
.Where(x => x["runtimeConfiguration"]?["contentTransfer"]?["transferMode"].ToString() == "Chunked")
.Select(x => x["runtimeConfiguration"] as JObject).ToList();

if (httpActionsWithChunking.Count > 0)
{
Expand All @@ -266,7 +268,9 @@ public void RemoveHttpChunkingConfiguration()
/// </summary>
public void ReplaceCallLocalFunctionActionsWithHttp()
{
var callLocalFunctionActions = _jObjectWorkflow.SelectTokens("$..actions.*").Where(x => x["type"].ToString() == "InvokeFunction").Select(x => x as JObject).ToList();
var callLocalFunctionActions = _jObjectWorkflow.SelectTokens("$..actions.*")
.Where(x => x["type"].ToString() == "InvokeFunction")
.Select(x => x as JObject).ToList();

if (callLocalFunctionActions.Count > 0)
{
Expand Down Expand Up @@ -305,8 +309,10 @@ public void ReplaceCallLocalFunctionActionsWithHttp()
/// </remarks>
public void ReplaceManagedIdentityAuthenticationTypeWithNone()
{
var httpActionsWithManagedIdentityAuthenticationType = _jObjectWorkflow.SelectTokens("$..actions.*").Where(x => x["type"].ToString() == "Http")
.Where(x => x["inputs"]?["authentication"]?["type"].ToString() == "ManagedServiceIdentity").Select(x => x["inputs"]?["authentication"] as JObject).ToList();
var httpActionsWithManagedIdentityAuthenticationType = _jObjectWorkflow.SelectTokens("$..actions.*")
.Where(x => x["type"].ToString() == "Http")
.Where(x => x["inputs"]?["authentication"]?["type"].ToString() == "ManagedServiceIdentity")
.Select(x => x["inputs"]?["authentication"] as JObject).ToList();

if (httpActionsWithManagedIdentityAuthenticationType.Count > 0)
{
Expand Down