-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from PowerShell/dev
Release of version 3.1.0.0 of xStorage
- Loading branch information
Showing
8 changed files
with
111 additions
and
52 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
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,47 @@ | ||
$script:DSCModuleName = 'xStorage' | ||
<# | ||
These integration tests ensure that exported cmdlets names do not conflict | ||
with any other names that are exposed by other common resource kit modules. | ||
#> | ||
$script:ModulesToTest = @( 'xNetworking','xComputerManagement','xDFS' ) | ||
|
||
#region HEADER | ||
# Integration Test Template Version: 1.1.0 | ||
[string] $script:moduleRoot = Join-Path -Path $(Split-Path -Parent (Split-Path -Parent (Split-Path -Parent $Script:MyInvocation.MyCommand.Path))) -ChildPath 'Modules\xStorage' | ||
|
||
if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or ` | ||
(-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1'))) ) | ||
{ | ||
& git @('clone','https://github.com/PowerShell/DscResource.Tests.git',(Join-Path -Path $script:moduleRoot -ChildPath '\DSCResource.Tests\')) | ||
} | ||
|
||
Import-Module (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1') -Force | ||
Import-Module (Join-Path -Path $script:moduleRoot -ChildPath "$($script:DSCModuleName).psd1") -Force | ||
$TestEnvironment = Initialize-TestEnvironment ` | ||
-DSCModuleName $script:DSCModuleName ` | ||
-DSCResourceName 'All' ` | ||
-TestType Integration | ||
|
||
#endregion | ||
|
||
# Using try/finally to always cleanup even if something awful happens. | ||
try | ||
{ | ||
Describe "$($script:DSCModuleName)_CommonModuleConflict" { | ||
|
||
foreach ($moduleToTest in $script:ModulesToTest) | ||
{ | ||
It "Should be able to install DSC Resource module '$moduleToTest'" { | ||
{ | ||
Install-Module -Name $moduleToTest -ErrorAction Stop | ||
} | Should Not Throw | ||
} | ||
} | ||
} | ||
} | ||
finally | ||
{ | ||
#region FOOTER | ||
Restore-TestEnvironment -TestEnvironment $TestEnvironment | ||
#endregion | ||
} |