-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Better handling of unhandled errors
- Loading branch information
1 parent
1c2c710
commit 57424f9
Showing
2 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using ACE; | ||
|
||
namespace ACE_Tests.Reworked; | ||
|
||
[Parallelizable(ParallelScope.Self)] | ||
public class ErrorTests | ||
{ | ||
[Test] | ||
public async Task Error_WhenThereIsExceptionThrownBecauseOfInvalidTemplatePath_ACEShouldNotCrash() | ||
{ | ||
var exitCode = await Program.Main([ | ||
"templates/reworked/key-vault/usage-pattern-1.bicep", | ||
"cf70b558-b930-45e4-9048-ebcefb926adf", | ||
"arm-estimator-tests-rg", | ||
"--inline", | ||
"parLocation=northeurope" | ||
]); | ||
|
||
Assert.That(exitCode, Is.EqualTo(1)); | ||
} | ||
|
||
[Test] | ||
public async Task Error_WhenThereIsExceptionThrownBecauseOfWrongParameter_ACEShouldNotCrash() | ||
{ | ||
var exitCode = await Program.Main([ | ||
"templates/reworked/key-vault/usage-patterns-1.bicep", | ||
"cf70b558-b930-45e4-9048-ebcefb926adf", | ||
"arm-estimator-tests-rg", | ||
"--inline", | ||
"parLocation2=northeurope" | ||
]); | ||
|
||
Assert.That(exitCode, Is.EqualTo(1)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters