-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add audit action for task.issue (#1033)
* Add audit action for issue * Added audit action for powershell * Added tests for node * Update old tests + move enum to .psm1 * Fix issue properties order * Add powershell tests * Bump versions * Update release notes
- Loading branch information
1 parent
f886362
commit 0e44434
Showing
13 changed files
with
185 additions
and
35 deletions.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
23 changes: 23 additions & 0 deletions
23
powershell/Tests/L0/Write-LoggingCommand.WritesAuditToIssues.ps1
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,23 @@ | ||
[CmdletBinding()] | ||
param() | ||
|
||
# Arrange. | ||
. $PSScriptRoot\..\lib\Initialize-Test.ps1 | ||
Invoke-VstsTaskScript -ScriptBlock { | ||
$vstsModule = Get-Module -Name VstsTaskSdk | ||
|
||
# 1 | ||
$actual = & $vstsModule Write-TaskError -Message "test error" -AsOutput | ||
$expected = "##vso[task.logissue type=error;source=TaskInternal]test error" | ||
Assert-TaskIssueMessagesAreEqual $expected $actual "No audit action in issue if not specified." | ||
|
||
# 2 | ||
$actual = & $vstsModule Write-TaskWarning -Message "test warning" -AuditAction '1' -AsOutput | ||
$expected = "##vso[task.logissue type=warning;source=TaskInternal;auditAction=1]test warning" | ||
Assert-TaskIssueMessagesAreEqual $expected $actual "String audit action." | ||
|
||
#3 | ||
$actual = & $vstsModule Write-TaskError -Message "test error" -AuditAction 1 -AsOutput | ||
$expected = "##vso[task.logissue type=error;source=TaskInternal;auditAction=1]test error" | ||
Assert-TaskIssueMessagesAreEqual $expected $actual "Int audit action." | ||
} |
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "0.20.1", | ||
"version": "0.21.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "node make.js build", | ||
|