Skip to content

Refactor and cleanup

70f8eac
Select commit
Loading
Failed to load commit list.
Merged

Migrate unit tests from Azure.Functions.Cli.Tests to Func.Unit.Tests #4480

Refactor and cleanup
70f8eac
Select commit
Loading
Failed to load commit list.
Azure Pipelines / coretools.public succeeded Jul 9, 2025 in 5m 13s

Build #4.0.10000-pr.25359.0 had test failures

Details

Tests

  • Failed: 1 (0.16%)
  • Passed: 631 (99.68%)
  • Other: 1 (0.16%)
  • Total: 633

Annotations

Check failure on line 1 in Azure.Functions.Cli.E2E.Tests.Commands.FuncInit.DotnetInitTests.Init_WithSupportedTargetFramework_GeneratesProjectFile_ContainsExpectedVersion(targetFramework: "net6.0")

See this annotation in the file changed.

@azure-pipelines azure-pipelines / coretools.public

Azure.Functions.Cli.E2E.Tests.Commands.FuncInit.DotnetInitTests.Init_WithSupportedTargetFramework_GeneratesProjectFile_ContainsExpectedVersion(targetFramework: "net6.0")

Expected command to exit with 0 but it did not. Error message: Index was out of range. Must be non-negative and less than or equal to the size of the collection. (Parameter 'chunkLength')
Raw output
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
   at Azure.Functions.Cli.TestFramework.Assertions.CommandResultAssertions.ExitWith(Int32 expectedExitCode) in /_/test/Cli/TestFramework/Assertions/CommandResultAssertions.cs:line 18
   at Azure.Functions.Cli.E2E.Tests.Commands.FuncInit.DotnetInitTests.Init_WithSupportedTargetFramework_GeneratesProjectFile_ContainsExpectedVersion(String targetFramework) in /_/test/Cli/Func.E2E.Tests/Commands/FuncInit/DotnetInitTests.cs:line 63
   at InvokeStub_DotnetInitTests.Init_WithSupportedTargetFramework_GeneratesProjectFile_ContainsExpectedVersion(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)