зеркало из https://github.com/microsoft/AL-Go.git
31 строка
1.3 KiB
PowerShell
31 строка
1.3 KiB
PowerShell
Get-Module TestActionsHelper | Remove-Module -Force
|
|
Import-Module (Join-Path $PSScriptRoot 'TestActionsHelper.psm1')
|
|
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
|
|
|
|
Describe "Troubleshooting Action Tests" {
|
|
BeforeAll {
|
|
$actionName = "Troubleshooting"
|
|
$scriptRoot = Join-Path $PSScriptRoot "..\Actions\$actionName" -Resolve
|
|
$scriptName = "$actionName.ps1"
|
|
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', 'scriptPath', Justification = 'False positive.')]
|
|
$scriptPath = Join-Path $scriptRoot $scriptName
|
|
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', 'actionScript', Justification = 'False positive.')]
|
|
$actionScript = GetActionScript -scriptRoot $scriptRoot -scriptName $scriptName
|
|
}
|
|
|
|
It 'Compile Action' {
|
|
Invoke-Expression $actionScript
|
|
}
|
|
|
|
It 'Test action.yaml matches script' {
|
|
$permissions = [ordered]@{
|
|
}
|
|
$outputs = [ordered]@{
|
|
}
|
|
YamlTest -scriptRoot $scriptRoot -actionName $actionName -actionScript $actionScript -permissions $permissions -outputs $outputs
|
|
}
|
|
|
|
# Call action
|
|
|
|
}
|