Skip to content

Commit cde58bc

Browse files
committed
trying to get other inproc tests passing
1 parent e57448d commit cde58bc

11 files changed

+16
-16
lines changed

test/Cli/Func.E2E.Tests/Commands/FuncStart/AuthTests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ public async Task Start_DotnetIsolated_EnableAuthFeature(
2727
var uniqueTestName = $"{methodName}_{authLevel}_{enableAuth}";
2828

2929
// Call func init and func new
30-
await FuncInitWithRetryAsync(uniqueTestName, new[] { ".", "--worker-runtime", "dotnet-isolated" });
31-
await FuncNewWithRetryAsync(uniqueTestName, new[] { ".", "--template", "Httptrigger", "--name", "HttpTrigger", "--authlevel", authLevel });
30+
await FuncInitWithRetryAsync(uniqueTestName, [".", "--worker-runtime", "dotnet-isolated"]);
31+
await FuncNewWithRetryAsync(uniqueTestName, [".", "--template", "Httptrigger", "--name", "HttpTrigger", "--authlevel", authLevel]);
3232

3333
// Call func start
3434
var funcStartCommand = new FuncStartCommand(FuncPath, methodName, Log);
3535
funcStartCommand.ProcessStartedHandler = async (process) =>
3636
{
37-
await ProcessHelper.ProcessStartedHandlerHelper(port, process, funcStartCommand.FileWriter ?? throw new ArgumentNullException(nameof(funcStartCommand.FileWriter)), "HttpTrigger");
37+
await ProcessHelper.ProcessStartedHandlerHelper(port, process, funcStartCommand.FileWriter ?? throw new ArgumentNullException(nameof(funcStartCommand)), "HttpTrigger");
3838
};
3939

4040
// Build command arguments based on enableAuth parameter

test/Cli/Func.E2E.Tests/Commands/FuncStart/Core/BaseMissingConfigTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ public async Task RunMissingLocalSettingsJsonTest(string language, string runtim
8989

9090
funcStartCommand.ProcessStartedHandler = async (process) =>
9191
{
92-
// Wait for host to start up if param is set, otherwise just wait 1 second for logs and kill the process
92+
// Wait for host to start up if param is set, otherwise just wait 5 seconds for logs and kill the process
9393
if (shouldWaitForHost)
9494
{
9595
await ProcessHelper.ProcessStartedHandlerHelper(port, process, funcStartCommand.FileWriter ?? throw new ArgumentNullException(nameof(funcStartCommand.FileWriter)), "HttpTriggerFunc");
9696
}
9797
else
9898
{
99-
await Task.Delay(1000);
99+
await Task.Delay(5000);
100100
process.Kill(true);
101101
}
102102
};

test/Cli/Func.E2E.Tests/Commands/FuncStart/InProcTests/InProcTestWithoutTargetFramework.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4+
using Azure.Functions.Cli.E2E.Tests.Traits;
45
using Azure.Functions.Cli.TestFramework.Assertions;
56
using Azure.Functions.Cli.TestFramework.Commands;
67
using Azure.Functions.Cli.TestFramework.Helpers;
78
using FluentAssertions;
8-
using Func.E2ETests.Traits;
99
using Xunit;
1010
using Xunit.Abstractions;
1111

test/Cli/Func.E2E.Tests/Commands/FuncStart/InProcTests/LogLevelTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

44
using Azure.Functions.Cli.E2E.Tests.Commands.FuncStart.Core;
5-
using Func.E2ETests.Traits;
5+
using Azure.Functions.Cli.E2E.Tests.Traits;
66
using Xunit;
77
using Xunit.Abstractions;
88

test/Cli/Func.E2E.Tests/Commands/FuncStart/InProcTests/MissingConfigTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

44
using Azure.Functions.Cli.E2E.Tests.Commands.FuncStart.Core;
5-
using Func.E2ETests.Traits;
5+
using Azure.Functions.Cli.E2E.Tests.Traits;
66
using Xunit;
77
using Xunit.Abstractions;
88

@@ -26,7 +26,7 @@ public async Task Start_InProc_MissingHostJson_FailsWithExpectedError()
2626
[Theory]
2727
[InlineData("dotnet", "--worker-runtime None", "Use the up/down arrow keys to select a worker runtime:", false, false, false)] // Runtime parameter set to None, worker runtime prompt displayed
2828
[InlineData("dotnet", "", $"Use the up/down arrow keys to select a worker runtime:", false, false, false)] // Runtime parameter not provided, worker runtime prompt displayed
29-
public async Task Start_InProc_MissingLocalSettingsJson_BehavesAsExpected(string language, string runtimeParameter, string expectedOutput, bool invokeFunction, bool setRuntimeViaEnvironment, bool shouldWaitForHost = true)
29+
public async Task Start_InProc_MissingLocalSettingsJson_BehavesAsExpected(string language, string runtimeParameter, string expectedOutput, bool invokeFunction, bool setRuntimeViaEnvironment, bool shouldWaitForHost)
3030
{
3131
await RunMissingLocalSettingsJsonTest(language, runtimeParameter, expectedOutput, invokeFunction, setRuntimeViaEnvironment, nameof(Start_InProc_MissingLocalSettingsJson_BehavesAsExpected), shouldWaitForHost);
3232
}

test/Cli/Func.E2E.Tests/Commands/FuncStart/InProcTests/UserSecretsTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

44
using Azure.Functions.Cli.E2E.Tests.Commands.FuncStart.Core;
5-
using Func.E2ETests.Traits;
5+
using Azure.Functions.Cli.E2E.Tests.Traits;
66
using Xunit;
77
using Xunit.Abstractions;
88

test/Cli/Func.E2E.Tests/Commands/FuncStart/InProcTests/VisualStudioInProcTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4+
using Azure.Functions.Cli.E2E.Tests.Traits;
45
using Azure.Functions.Cli.TestFramework.Assertions;
56
using Azure.Functions.Cli.TestFramework.Commands;
67
using Azure.Functions.Cli.TestFramework.Helpers;
78
using FluentAssertions;
8-
using Func.E2ETests.Traits;
99
using Xunit;
1010
using Xunit.Abstractions;
1111

test/Cli/Func.E2E.Tests/Commands/FuncStart/TestsWithFixtures/DotnetInProc6Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

44
using Azure.Functions.Cli.E2E.Tests.Fixtures;
5+
using Azure.Functions.Cli.E2E.Tests.Traits;
56
using Azure.Functions.Cli.TestFramework.Assertions;
67
using Azure.Functions.Cli.TestFramework.Commands;
78
using Azure.Functions.Cli.TestFramework.Helpers;
89
using FluentAssertions;
9-
using Func.E2ETests.Traits;
1010
using Xunit;
1111
using Xunit.Abstractions;
1212

test/Cli/Func.E2E.Tests/Commands/FuncStart/TestsWithFixtures/DotnetInProc8Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

44
using Azure.Functions.Cli.E2E.Tests.Fixtures;
5+
using Azure.Functions.Cli.E2E.Tests.Traits;
56
using Azure.Functions.Cli.TestFramework.Assertions;
67
using Azure.Functions.Cli.TestFramework.Commands;
78
using Azure.Functions.Cli.TestFramework.Helpers;
89
using FluentAssertions;
9-
using Func.E2ETests.Traits;
1010
using Xunit;
1111
using Xunit.Abstractions;
1212

test/Cli/Func.E2E.Tests/Commands/FuncStart/TestsWithFixtures/DotnetIsolatedTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

44
using Azure.Functions.Cli.E2E.Tests.Fixtures;
5+
using Azure.Functions.Cli.E2E.Tests.Traits;
56
using Azure.Functions.Cli.TestFramework.Assertions;
67
using Azure.Functions.Cli.TestFramework.Commands;
78
using Azure.Functions.Cli.TestFramework.Helpers;
89
using FluentAssertions;
9-
using Func.E2ETests.Traits;
1010
using Xunit;
1111
using Xunit.Abstractions;
1212

@@ -75,7 +75,7 @@ public void Start_DotnetIsolated_WithRuntimeSpecified_SuccessfulFunctionExecutio
7575
because: "response from default function should be 'Welcome to Azure Functions!'");
7676

7777
// Validate default host was started
78-
result.Should().StartDefaultHost();
78+
result.Should().HaveStdOutContaining("Selected default host.");
7979
}
8080

8181
[Fact]

test/Cli/Func.E2E.Tests/Traits/TestTraits.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4-
namespace Func.E2ETests.Traits
4+
namespace Azure.Functions.Cli.E2E.Tests.Traits
55
{
66
internal static class TestTraits
77
{

0 commit comments

Comments
 (0)