Skip to content

Commit

Permalink
exit in error
Browse files Browse the repository at this point in the history
  • Loading branch information
aishwaryabh committed Jan 29, 2025
1 parent 60e4175 commit 9fc8325
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion test/Azure.Functions.Cli.Tests/E2E/StartTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose --runtime inproc8"
},
ExpectExit = true,
ExitInError = true,
ErrorContains = ["Failed to locate the inproc8 model host"],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -766,6 +767,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose"
},
ExpectExit = true,
ExitInError = true,
ErrorContains = ["Failed to locate the inproc8 model host"],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -885,6 +887,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose"
},
ExpectExit = false,
ExitInError = true,
ErrorContains = ["Failed to locate the inproc6 model host at"],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -918,6 +921,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose --runtime inproc6"
},
ExpectExit = false,
ExitInError = true,
ErrorContains = ["Failed to locate the inproc6 model host at"],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -999,7 +1003,8 @@ await CliTester.Run(new RunConfiguration[]
{
$"start --port {_funcHostPort} --verbose --runtime inproc6"
},
ExpectExit = false,
ExpectExit = true,
ExitInError = true,
ErrorContains = ["The runtime argument value provided, 'inproc6', is invalid. The provided value is only valid for the worker runtime 'dotnet'."],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -1033,6 +1038,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose --runtime inproc8"
},
ExpectExit = false,
ExitInError = true,
ErrorContains = ["The runtime argument value provided, 'inproc8', is invalid. The provided value is only valid for the worker runtime 'dotnet'."],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -1066,6 +1072,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose --runtime inproc8"
},
ExpectExit = false,
ExitInError = true,
ErrorContains = ["The runtime argument value provided, 'inproc8', is invalid. For the 'inproc8' runtime, the 'FUNCTIONS_INPROC_NET8_ENABLED' environment variable must be set. See https://aka.ms/azure-functions/dotnet/net8-in-process."],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -1099,6 +1106,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose --runtime default"
},
ExpectExit = false,
ExitInError = true,
ErrorContains = ["The runtime argument value provided, 'default', is invalid. The provided value is only valid for the worker runtime 'dotnetIsolated'."],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -1132,6 +1140,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose --runtime default"
},
ExpectExit = false,
ExitInError = true,
ErrorContains = ["The runtime argument value provided, 'default', is invalid. The provided value is only valid for the worker runtime 'dotnetIsolated'."],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -1165,6 +1174,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose --runtime inproc6"
},
ExpectExit = false,
ExitInError = true,
ErrorContains = ["The runtime argument value provided, 'inproc6', is invalid. For the 'inproc6' runtime, the 'FUNCTIONS_INPROC_NET8_ENABLED' environment variable cannot be be set. See https://aka.ms/azure-functions/dotnet/net8-in-process."],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -1199,6 +1209,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose --runtime inproc6"
},
ExpectExit = false,
ExitInError = true,
ErrorContains = ["The runtime argument value provided, 'inproc6', is invalid. The provided value is only valid for the worker runtime 'dotnet'."],
Test = async (workingDir, p, _) =>
{
Expand Down Expand Up @@ -1233,6 +1244,7 @@ await CliTester.Run(new RunConfiguration[]
$"start --port {_funcHostPort} --verbose --runtime inproc8"
},
ExpectExit = false,
ExitInError = true,
ErrorContains = ["The runtime argument value provided, 'inproc8', is invalid. The provided value is only valid for the worker runtime 'dotnet'."],
Test = async (workingDir, p, _) =>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<RunConfiguration>
<TestCaseFilter>(Group != RequiresNestedInProcArtifacts) &amp; (Group != UseInVisualStudioConsolidatedArtifactGeneration)</TestCaseFilter>
<TestCaseFilter>(Group != RequiresNestedInProcArtifacts) &amp; (Group != UseInVisualStudioConsolidatedArtifactGeneration) &amp; (Group != UseInConsolidatedArtifactGeneration)</TestCaseFilter>
</RunConfiguration>
</RunSettings>

0 comments on commit 9fc8325

Please sign in to comment.