-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for inline script in azurepowershell task
* Support for inline script in azurepowershell task * Resolving CR comments
- Loading branch information
1 parent
8cc3b3c
commit d923fb1
Showing
11 changed files
with
162 additions
and
58 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[CmdletBinding()] | ||
param() | ||
|
||
# Arrange. | ||
. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 | ||
Unregister-Mock Get-VstsInput | ||
Register-Mock Get-VstsInput { "InlineScript" } -- -Name ScriptType -Require | ||
Register-Mock Get-VstsInput { ",@( 'item 1', 'item 2')" } -- -Name Inline | ||
Register-Mock Initialize-Azure | ||
|
||
# Act. | ||
$actual = @( & $PSScriptRoot\..\AzurePowerShell.ps1 ) | ||
$global:ErrorActionPreference = 'Stop' # Reset to stop. | ||
|
||
# Assert the correct number of elements is returned. | ||
Assert-AreEqual 1 $actual.Length | ||
|
||
# Assert item 1 and 2 are in an array together. | ||
Assert-AreEqual 2 @($actual[0]).Length | ||
Assert-AreEqual 'item 1' $actual[0][0] | ||
Assert-AreEqual 'item 2' $actual[0][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
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