Skip to content

Commit

Permalink
Moved Get-ExtendedProtectionConfiguration to shared folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaulson45 committed Aug 23, 2023
1 parent 969e92f commit 0305dd5
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

. $PSScriptRoot\..\..\..\..\Security\src\ExchangeExtendedProtectionManagement\DataCollection\Get-ExtendedProtectionConfiguration.ps1
. $PSScriptRoot\..\..\..\..\Shared\Get-ExtendedProtectionConfiguration.ps1
. $PSScriptRoot\..\..\..\..\Shared\ErrorMonitorFunctions.ps1
. $PSScriptRoot\..\..\..\..\Shared\Get-ExchangeBuildVersionInformation.ps1
. $PSScriptRoot\..\..\..\..\Shared\Get-ExchangeSettingOverride.ps1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

. $PSScriptRoot\..\DataCollection\Get-ExtendedProtectionConfiguration.ps1
. $PSScriptRoot\..\..\..\..\Shared\Get-ExtendedProtectionConfiguration.ps1
. $PSScriptRoot\..\..\..\..\Shared\Invoke-ScriptBlockHandler.ps1
. $PSScriptRoot\..\..\..\..\Shared\Write-ErrorInformation.ps1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the MIT License.

. $PSScriptRoot\..\..\..\..\Shared\TLS\Get-AllTlsSettings.ps1
. $PSScriptRoot\Get-ExtendedProtectionConfiguration.ps1
. $PSScriptRoot\..\..\..\..\Shared\Get-ExtendedProtectionConfiguration.ps1

# This function is used to collect the required information needed to determine if a server is ready for Extended Protection
function Get-ExtendedProtectionPrerequisitesCheck {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

. $PSScriptRoot\..\..\..\..\Shared\Invoke-CatchActionError.ps1
. $PSScriptRoot\..\..\..\..\Shared\Invoke-ScriptBlockHandler.ps1
. $PSScriptRoot\..\..\..\..\Shared\Write-ErrorInformation.ps1
. $PSScriptRoot\Invoke-CatchActionError.ps1
. $PSScriptRoot\Invoke-ScriptBlockHandler.ps1
. $PSScriptRoot\Write-ErrorInformation.ps1

function Get-ExtendedProtectionConfiguration {
[CmdletBinding()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param()
BeforeAll {
$Script:parentPath = (Split-Path -Parent $PSScriptRoot)
$Script:Server = $env:COMPUTERNAME
. $Script:parentPath\Get-ExtendedProtectionConfiguration.ps1
. $Script:parentPath\..\Get-ExtendedProtectionConfiguration.ps1

function Invoke-CatchActions {
param()
Expand Down Expand Up @@ -110,28 +110,28 @@ BeforeAll {
}
}

$Script:E15_NotConfigured_Both_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E15_NotConfigured_Both_ApplicationHost.config
$Script:E15_NotConfigured_Cas_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E15_NotConfigured_Cas_ApplicationHost.config
$Script:E15_NotConfigured_Mbx_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E15_NotConfigured_Mbx_ApplicationHost.config
$Script:E16_NotConfigured_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E16_NotConfigured_ApplicationHost.config
$Script:E19_NotConfigured_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E19_NotConfigured_ApplicationHost.config

$Script:E15_Configured_Both_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E15_Configured_Both_ApplicationHost.config
$Script:E15_Configured_Cas_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E15_Configured_Cas_ApplicationHost.config
$Script:E15_Configured_Mbx_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E15_Configured_Mbx_ApplicationHost.config
$Script:E16_Configured_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E16_Configured_ApplicationHost.config
$Script:E16_Configured_IPFilter_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E16_Configured_IPFilter_ApplicationHost.config
$Script:E19_Configured_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E19_Configured_ApplicationHost.config
$Script:E19_Configured_IPFilter_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E19_Configured_IPFilter_ApplicationHost.config

$Script:E19_MisConfigured_ApplicationHost = LoadApplicationHostConfig -Path $Script:parentPath\Tests\Data\E19_MisConfigured_ApplicationHost.config
$Script:E15_NotConfigured_Both_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E15_NotConfigured_Both_ApplicationHost.config
$Script:E15_NotConfigured_Cas_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E15_NotConfigured_Cas_ApplicationHost.config
$Script:E15_NotConfigured_Mbx_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E15_NotConfigured_Mbx_ApplicationHost.config
$Script:E16_NotConfigured_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E16_NotConfigured_ApplicationHost.config
$Script:E19_NotConfigured_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E19_NotConfigured_ApplicationHost.config

$Script:E15_Configured_Both_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E15_Configured_Both_ApplicationHost.config
$Script:E15_Configured_Cas_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E15_Configured_Cas_ApplicationHost.config
$Script:E15_Configured_Mbx_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E15_Configured_Mbx_ApplicationHost.config
$Script:E16_Configured_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E16_Configured_ApplicationHost.config
$Script:E16_Configured_IPFilter_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E16_Configured_IPFilter_ApplicationHost.config
$Script:E19_Configured_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E19_Configured_ApplicationHost.config
$Script:E19_Configured_IPFilter_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E19_Configured_IPFilter_ApplicationHost.config

$Script:E19_MisConfigured_ApplicationHost = LoadApplicationHostConfig -Path $PSScriptRoot\Data\E19_MisConfigured_ApplicationHost.config
}

Describe "Testing Get-ExtendedProtectionConfiguration.ps1" {

Context "No ExSetupVersion Passed To The Function" {
BeforeAll {
Mock Get-Command { return Import-Clixml -Path $Script:parentPath\Tests\Data\GetCommand.xml }
Mock Get-Command { return Import-Clixml -Path $PSScriptRoot\Data\GetCommand.xml }

$mockParams = @{
ComputerName = $Server
Expand Down

0 comments on commit 0305dd5

Please sign in to comment.