-
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.
Validate Root Container and add. args (#3654)
- Loading branch information
1 parent
44843fd
commit 53405ea
Showing
7 changed files
with
53 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[CmdletBinding()] | ||
param() | ||
|
||
. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 | ||
. $PSScriptRoot\..\Utility.ps1 | ||
|
||
Register-Mock Write-Warning { } | ||
|
||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments "/S" | ||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments "/S " | ||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments "/XN /S /XO" | ||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments " /S " | ||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments "/Y /S" | ||
|
||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments "/s" | ||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments "/s " | ||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments "/XN /s /XO" | ||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments " /s " | ||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments "/Y /s" | ||
Assert-WasCalled Write-Warning -Times 10 | ||
|
||
Unregister-Mock Write-Warning | ||
Register-Mock Write-Warning { } | ||
|
||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments "/SetContentType:video/mp4" | ||
Check-ContainerNameAndArgs -containerName '$root' -additionalArguments "/Source:path /SetContentType:video/mp4" | ||
Assert-WasCalled Write-Warning -Times 0 |
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