mirror of
https://github.com/PowerShell/PSDscResources
synced 2026-06-21 13:45:29 +00:00
fixing path names
This commit is contained in:
@@ -11,8 +11,8 @@ $errorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 'Latest'
|
||||
|
||||
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
|
||||
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testsFolderFilePath -ChildPath 'TestHelpers'
|
||||
$script:testFolderPath = Split-Path -Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testFolderPath -ChildPath 'TestHelpers'
|
||||
Import-Module -Name (Join-Path -Path $script:testHelpersPath -ChildPath 'CommonTestHelper.psm1')
|
||||
|
||||
|
||||
|
||||
@@ -5,13 +5,19 @@
|
||||
If this happens to you, it is fixable, but the fix is difficult and time-consuming.
|
||||
#>
|
||||
|
||||
if ($PSVersionTable.PSVersion.Major -lt 5 -or $PSVersionTable.PSVersion.Minor -lt 1)
|
||||
{
|
||||
Write-Warning -Message 'Cannot run PSDscResources integration tests on PowerShell versions lower than 5.1'
|
||||
return
|
||||
}
|
||||
|
||||
$errorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 'Latest'
|
||||
|
||||
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
|
||||
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
|
||||
$script:commonTestHelperFilePath = Join-Path -Path $testsFolderFilePath -ChildPath 'CommonTestHelper.psm1'
|
||||
Import-Module -Name $commonTestHelperFilePath
|
||||
$script:testFolderPath = Split-Path -Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testFolderPath -ChildPath 'TestHelpers'
|
||||
Import-Module -Name (Join-Path -Path $script:testHelpersPath -ChildPath 'CommonTestHelper.psm1')
|
||||
|
||||
$script:testEnvironment = Enter-DscResourceTestEnvironment `
|
||||
-DscResourceModuleName 'PSDscResources' `
|
||||
@@ -23,7 +29,7 @@ try
|
||||
Describe 'Registry End to End Tests' {
|
||||
BeforeAll {
|
||||
# Import Registry resource module for Get-TargetResource, Test-TargetResource, Set-TargetResource
|
||||
$moduleRootFilePath = Split-Path -Path $script:testsFolderFilePath -Parent
|
||||
$moduleRootFilePath = Split-Path -Path $script:testFolderPath -Parent
|
||||
$dscResourcesFolderFilePath = Join-Path -Path $moduleRootFilePath -ChildPath 'DscResources'
|
||||
$registryResourceFolderFilePath = Join-Path -Path $dscResourcesFolderFilePath -ChildPath 'MSFT_RegistryResource'
|
||||
$registryResourceModuleFilePath = Join-Path -Path $registryResourceFolderFilePath -ChildPath 'MSFT_RegistryResource.psm1'
|
||||
|
||||
@@ -9,8 +9,8 @@ $errorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 'Latest'
|
||||
|
||||
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
|
||||
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testFolderFilePath -ChildPath 'TestHelpers'
|
||||
$script:testFolderPath = Split-Path -Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testFolderPath -ChildPath 'TestHelpers'
|
||||
Import-Module -Name (Join-Path -Path $script:testHelpersPath -ChildPath 'CommonTestHelper.psm1')
|
||||
|
||||
$script:testEnvironment = Enter-DscResourceTestEnvironment `
|
||||
@@ -27,7 +27,7 @@ try
|
||||
Import-Module -Name $registryTestHelperFilePath -Force
|
||||
|
||||
# Import Registry resource module for Get-TargetResource, Test-TargetResource, Set-TargetResource
|
||||
$moduleRootFilePath = Split-Path -Path $script:testsFolderFilePath -Parent
|
||||
$moduleRootFilePath = Split-Path -Path $script:testFolderPath -Parent
|
||||
$dscResourcesFolderFilePath = Join-Path -Path $moduleRootFilePath -ChildPath 'DscResources'
|
||||
$registryResourceFolderFilePath = Join-Path -Path $dscResourcesFolderFilePath -ChildPath 'MSFT_RegistryResource'
|
||||
$registryResourceModuleFilePath = Join-Path -Path $registryResourceFolderFilePath -ChildPath 'MSFT_RegistryResource.psm1'
|
||||
|
||||
@@ -9,8 +9,8 @@ if ($PSVersionTable.PSVersion.Major -lt 5 -or $PSVersionTable.PSVersion.Minor -l
|
||||
|
||||
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
|
||||
$script:moduleRootPath = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent
|
||||
$script:testPath = Split-Path -Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testPath -ChildPath 'TestHelpers'
|
||||
$script:testFolderPath = Split-Path -Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testFolderPath -ChildPath 'TestHelpers'
|
||||
Import-Module -Name (Join-Path -Path $script:testHelpersPath -ChildPath 'CommonTestHelper.psm1')
|
||||
|
||||
$script:testEnvironment = Enter-DscResourceTestEnvironment `
|
||||
|
||||
@@ -18,8 +18,8 @@ Set-StrictMode -Version 'Latest'
|
||||
|
||||
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
|
||||
$script:moduleRootPath = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent
|
||||
$script:testPath = Split-Path -Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testPath -ChildPath 'TestHelpers'
|
||||
$script:testFolderPath = Split-Path -Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testFolderPath -ChildPath 'TestHelpers'
|
||||
Import-Module -Name (Join-Path -Path $script:testHelpersPath -ChildPath 'CommonTestHelper.psm1')
|
||||
|
||||
$script:testEnvironment = Enter-DscResourceTestEnvironment `
|
||||
|
||||
@@ -2,8 +2,8 @@ $errorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 'Latest'
|
||||
|
||||
# Import CommonTestHelper for Enter-DscResourceTestEnvironment, Exit-DscResourceTestEnvironment
|
||||
$script:testsFolderFilePath = Split-Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testFolderFilePath -ChildPath 'TestHelpers'
|
||||
$script:testFolderPath = Split-Path -Path $PSScriptRoot -Parent
|
||||
$script:testHelpersPath = Join-Path -Path $script:testFolderPath -ChildPath 'TestHelpers'
|
||||
Import-Module -Name (Join-Path -Path $script:testHelpersPath -ChildPath 'CommonTestHelper.psm1')
|
||||
|
||||
$script:testEnvironment = Enter-DscResourceTestEnvironment `
|
||||
|
||||
Reference in New Issue
Block a user