mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
29 lines
560 B
PowerShell
29 lines
560 B
PowerShell
function Write-IcingaTestOutput()
|
|
{
|
|
param(
|
|
[ValidateSet('Passed', 'Warning', 'Failed')]
|
|
$Severity,
|
|
$Message
|
|
);
|
|
|
|
$Color = 'Green';
|
|
|
|
Switch ($Severity) {
|
|
'Passed' {
|
|
$Color = 'Green';
|
|
break;
|
|
};
|
|
'Warning' {
|
|
$Color = 'Yellow';
|
|
break;
|
|
};
|
|
'Failed' {
|
|
$Color = 'Red';
|
|
break;
|
|
};
|
|
}
|
|
|
|
Write-Host '[' -NoNewline;
|
|
Write-Host $Severity -ForegroundColor $Color -NoNewline;
|
|
Write-Host ']:' $Message;
|
|
}
|