-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into Fix-Products
- Loading branch information
Showing
18 changed files
with
1,387 additions
and
430 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ output/ | |
markdownissues.txt | ||
node_modules | ||
package-lock.json | ||
*.local.* |
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
43 changes: 43 additions & 0 deletions
43
Tests/Integration/WildcardInProduct/updateservicesDsc_WilcardInProduct.tests.ps1
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,43 @@ | ||
Describe "Basic tests" { | ||
Context "Windows Feature are correctly installed" { | ||
$TestCases = @{ | ||
Feature = 'UpdateServices' | ||
Installed = $True | ||
}, | ||
@{ | ||
Feature = 'UpdateServices-RSAT' | ||
Installed = $True | ||
} | ||
|
||
It "Should <feature> be installed" -TestCases $TestCases { | ||
(Get-WindowsFeature -Name $Feature).Installed | Should -Be $Installed | ||
} | ||
} | ||
|
||
Context "Wsus service is correctly configured" { | ||
It "Should can the informations of update service" { | ||
{$script:wuServer = Get-WsusServer}| Should -Not -Throw | ||
} | ||
|
||
It "Should product are correctly configured" { | ||
$AllProductsServer = $script:wuServer.GetUpdateCategories().Title | Where-Object {$_ -like 'Windows Server*'} | ||
|
||
($AllProductsServer | Measure-Object).Count | Should -Be ($script:wuServer.GetSubscription().GetUpdateCategories().Title | Measure-Object ).Count | ||
|
||
foreach ($ProductServer in $AllProductsServer) | ||
{ | ||
$script:wuServer.GetSubscription().GetUpdateCategories().Title | Should -Contain $ProductServer | ||
} | ||
} | ||
|
||
$TestCases = @{Classification = "Critical Updates"}, | ||
@{Classification = "Definition Updates"}, | ||
@{Classification = "Security Updates"}, | ||
@{Classification = "Service Packs"}, | ||
@{Classification = "Update Rollups"} | ||
|
||
It "Should have <Classification> in classifications value" -TestCases $TestCases{ | ||
$script:wuServer.GetSubscription().GetUpdateClassifications().Title | Should -Contain $Classification | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
Tests/Integration/allProducts/updateservicesDsc_AllProducts.tests.ps1
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,43 @@ | ||
Describe "Tests installation with all products" { | ||
Context "Windows Feature are correctly installed" { | ||
$TestCases = @{ | ||
Feature = 'UpdateServices' | ||
Installed = $True | ||
}, | ||
@{ | ||
Feature = 'UpdateServices-RSAT' | ||
Installed = $True | ||
} | ||
|
||
It "Should <feature> be installed" -TestCases $TestCases { | ||
(Get-WindowsFeature -Name $Feature).Installed | Should -Be $Installed | ||
} | ||
} | ||
|
||
Context "Wsus service is correctly configured" { | ||
It "Should can the informations of update service" { | ||
{$script:wuServer = Get-WsusServer}| Should -Not -Throw | ||
} | ||
|
||
It "Should product are correctly configured" { | ||
$AllProducts = $script:wuServer.GetUpdateCategories().Title | Where-Object {$_ -in @('Windows','Office')} | ||
|
||
($AllProducts | Measure-Object).Count | Should -Be ($script:wuServer.GetSubscription().GetUpdateCategories().Title | Measure-Object ).Count | ||
|
||
foreach ($ProductServer in $AllProductsServer) | ||
{ | ||
$script:wuServer.GetSubscription().GetUpdateCategories().Title | Should -Contain $ProductServer | ||
} | ||
} | ||
|
||
$TestCases = @{Classification = "Critical Updates"}, | ||
@{Classification = "Definition Updates"}, | ||
@{Classification = "Security Updates"}, | ||
@{Classification = "Service Packs"}, | ||
@{Classification = "Update Rollups"} | ||
|
||
It "Should have <Classification> in classifications value" -TestCases $TestCases{ | ||
$script:wuServer.GetSubscription().GetUpdateClassifications().Title | Should -Contain $Classification | ||
} | ||
} | ||
} |
Oops, something went wrong.