Skip to content

Commit

Permalink
Typ in xWaitForADDomain.Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Jun 7, 2019
1 parent b9e803f commit 1fa1e4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/Unit/MSFT_xWaitForADDomain.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ try
Mock -CommandName Start-Sleep
Mock -CommandName Clear-DnsClientCache
{Set-TargetResource @testParams} | Should -Not -Throw
$global:DSCMachineStatus | should -not -be 1
$global:DSCMachineStatus | Should -Not -Be 1
Assert-MockCalled -CommandName Start-Sleep -Times 0 -Scope It
Assert-MockCalled -CommandName Clear-DnsClientCache -Times 0 -Scope It
}

It "Throws exception and does not set `$global:DSCMachineStatus when domain not found after $($testParams.RetryCount) retries when RebootRetryCount is not set" {
Mock -CommandName Get-Domain
{Set-TargetResource @testParams} | Should -Throw
$global:DSCMachineStatus | should -not -be 1
$global:DSCMachineStatus | Should -Not -Be 1
}

It "Throws exception when domain not found after $($rebootTestParams.RebootRetryCount) reboot retries when RebootRetryCount is exceeded" {
Expand All @@ -143,7 +143,7 @@ try
Mock -CommandName Get-Domain
Mock -CommandName Get-Content -MockWith {return 0}
{Set-TargetResource @rebootTestParams} | Should -Not -Throw
$global:DSCMachineStatus | should -be 1
$global:DSCMachineStatus | Should -Be 1
}

It "Calls Get-Domain exactly $($testParams.RetryCount) times when domain not found" {
Expand Down

0 comments on commit 1fa1e4a

Please sign in to comment.