diff --git a/ChangeLog.md b/ChangeLog.md index e661288..8e3b25f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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: diff --git a/src/LogicAppUnit.Samples.LogicApps.Tests/HttpWithManagedIdentityWorkflow/HttpWithManagedIdentityWorkflowTest.cs b/src/LogicAppUnit.Samples.LogicApps.Tests/HttpWithManagedIdentityWorkflow/HttpWithManagedIdentityWorkflowTest.cs index c66cd55..937f86f 100644 --- a/src/LogicAppUnit.Samples.LogicApps.Tests/HttpWithManagedIdentityWorkflow/HttpWithManagedIdentityWorkflowTest.cs +++ b/src/LogicAppUnit.Samples.LogicApps.Tests/HttpWithManagedIdentityWorkflow/HttpWithManagedIdentityWorkflowTest.cs @@ -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 { diff --git a/src/LogicAppUnit/LogicAppUnit.csproj b/src/LogicAppUnit/LogicAppUnit.csproj index 2c1850d..f2f707f 100644 --- a/src/LogicAppUnit/LogicAppUnit.csproj +++ b/src/LogicAppUnit/LogicAppUnit.csproj @@ -4,7 +4,7 @@ net6.0 LogicAppUnit true - 1.11.0 + 1.12.0 Logic App Unit Testing Framework Unit testing framework for Standard Logic Apps. https://github.com/LogicAppUnit/TestingFramework diff --git a/src/LogicAppUnit/Wrapper/WorkflowDefinitionWrapper.cs b/src/LogicAppUnit/Wrapper/WorkflowDefinitionWrapper.cs index aef72ef..9f0c3ec 100644 --- a/src/LogicAppUnit/Wrapper/WorkflowDefinitionWrapper.cs +++ b/src/LogicAppUnit/Wrapper/WorkflowDefinitionWrapper.cs @@ -244,8 +244,10 @@ public void ReplaceBuiltInConnectorActionsWithHttp(List builtInConnector /// 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) { @@ -266,7 +268,9 @@ public void RemoveHttpChunkingConfiguration() /// 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) { @@ -305,8 +309,10 @@ public void ReplaceCallLocalFunctionActionsWithHttp() /// 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) {