@@ -33,7 +33,7 @@ Describe "Protect-CFCell" {
3333 Get-Service " Termservice" | Set-Service - StartupType " Automatic"
3434 netstat / p tcp / a | findstr " :3389 " | Should -Not - BeNullOrEmpty
3535
36- Protect-CFCell
36+ Protect-CFCell - IaaS " ignored "
3737
3838 Get-ItemProperty - Path " HKLM:\System\CurrentControlSet\Control\Terminal Server" | select - exp fDenyTSConnections | Should - Be 1
3939 netstat / p tcp / a | findstr " :3389 " | Should - BeNullOrEmpty
@@ -44,7 +44,7 @@ Describe "Protect-CFCell" {
4444 It " disables the services" {
4545 Get-Service | Where-Object {$_.Name -eq " WinRM" } | Set-Service - StartupType Automatic
4646 Get-Service | Where-Object {$_.Name -eq " W3Svc" } | Set-Service - StartupType Automatic
47- Protect-CFCell
47+ Protect-CFCell - IaaS " ignored "
4848 (Get-Service | Where-Object {$_.Name -eq " WinRM" } ).StartType| Should - Be " Disabled"
4949 $w3svcStartType = (Get-Service | Where-Object {$_.Name -eq " W3Svc" } ).StartType
5050 " Disabled" , $null -contains $w3svcStartType | Should - Be $true
@@ -55,7 +55,7 @@ Describe "Protect-CFCell" {
5555 get-firewall " public" | Should - Be " public,Allow,Allow"
5656 get-firewall " private" | Should - Be " private,Allow,Allow"
5757 get-firewall " domain" | Should - Be " domain,Allow,Allow"
58- Protect-CFCell
58+ Protect-CFCell - IaaS " ignored "
5959 get-firewall " public" | Should - Be " public,Block,Allow"
6060 get-firewall " private" | Should - Be " private,Block,Allow"
6161 get-firewall " domain" | Should - Be " domain,Block,Allow"
@@ -74,7 +74,7 @@ Describe "Protect-CFCell" {
7474 }
7575 Mock - ModuleName BOSH.CFCell Set-MpPreference { }
7676
77- Protect-CFCell
77+ Protect-CFCell - IaaS " ignored "
7878
7979 Assert-MockCalled Write-Log - Exactly 1 - Scope It - ModuleName BOSH.CFCell - ParameterFilter { $Message -eq " Disabling Windows Defender Features" }
8080
@@ -88,7 +88,7 @@ Describe "Protect-CFCell" {
8888 Mock - ModuleName BOSH.CFCell Get-Command { $false }
8989 Mock - ModuleName BOSH.CFCell Set-MpPreference { }
9090
91- Protect-CFCell
91+ Protect-CFCell - IaaS " ignored "
9292
9393 Assert-MockCalled Write-Log - Exactly 1 - Scope It - ModuleName BOSH.CFCell - ParameterFilter { $Message -eq " Set-MpPreference command not found, assuming Windows Defender is not installed" }
9494 Assert-MockCalled Set-MpPreference - Scope It - Exactly 0 - ModuleName BOSH.CFCell
@@ -108,25 +108,25 @@ Describe "Install-CFFeatures" {
108108 }
109109
110110 It " triggers a machine restart when the -ForceReboot flag is set" {
111- { Install-CFFeatures - ForceReboot } | Should -Not - Throw
111+ { Install-CFFeatures - IaaS " ignored " - ForceReboot } | Should -Not - Throw
112112
113113 Assert-MockCalled Restart-Computer - Times 1 - Scope It - ModuleName BOSH.CFCell
114114 }
115115
116116 It " doesn't trigger a machine restart if -ForceReboot flag not set" {
117- { Install-CFFeatures } | Should -Not - Throw
117+ { Install-CFFeatures - IaaS " ignored " } | Should -Not - Throw
118118
119119 Assert-MockCalled Restart-Computer - Times 0 - Scope It - ModuleName BOSH.CFCell
120120 }
121121
122122 It " logs Installing CloudFoundry Cell Windows Features" {
123- { Install-CFFeatures } | Should -Not - Throw
123+ { Install-CFFeatures - IaaS " ignored " } | Should -Not - Throw
124124
125125 Assert-MockCalled Write-Log - Times 1 - Scope It - ModuleName BOSH.CFCell - ParameterFilter { $Message -eq " Installing CloudFoundry Cell Windows Features" }
126126 }
127127
128128 It " logs Installed CloudFoundry Cell Windows Features after installation" {
129- { Install-CFFeatures } | Should -Not - Throw
129+ { Install-CFFeatures - IaaS " ignored " } | Should -Not - Throw
130130
131131 Assert-MockCalled Write-Log - Times 1 - Scope It - ModuleName BOSH.CFCell - ParameterFilter { $Message -eq " Installed CloudFoundry Cell Windows Features" }
132132 }
0 commit comments