Skip to content

Commit

Permalink
Fix import statement in all tests (dsccommunity#563)
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
johlju authored and Gregory Storme committed Feb 14, 2020
1 parent 60b7fb7 commit bbc6aea
Show file tree
Hide file tree
Showing 30 changed files with 31 additions and 29 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md)

- xWebAdministration
- Update GitVersion.yml with the correct regular expression.
- Fix import statement in all tests, making sure it throws if module
DscResource.Test cannot be imported.
- xWebsite
- Fixed HTTPS binding issue causing failure when CertificateSubject matches
multiple certificates.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $script:dscResourceName = 'MSFT_WebApplicationHandler'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/MSFT_XIISLogging.Integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $script:dscResourceName = 'MSFT_xIISLogging'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $script:dscResourceName = 'MSFT_xIISFeatureDelegation'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/MSFT_xIISHandler.Integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $script:dscResourceName = 'MSFT_xIISHandler'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $script:dscResourceName = 'MSFT_xIISMimeTypeMapping'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/MSFT_xSslSettings.Integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $script:dscResourceName = 'MSFT_xSslSettings'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/MSFT_xWebAppPool.Integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $script:dscResourceName = 'MSFT_xWebAppPool'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $script:dscResourceName = 'MSFT_xWebAppPoolDefaults'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $script:dscResourceName = 'MSFT_xWebApplication'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $script:dscResourceName = 'MSFT_xWebConfigKeyValue'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $script:dscResourceName = "MSFT_xWebConfigProperty"

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $script:dscResourceName = "MSFT_xWebConfigPropertyCollection"

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/MSFT_xWebSite.Integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $script:dscResourceName = 'MSFT_xWebSite'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $script:dscResourceName = 'MSFT_xWebSiteDefaults'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $script:dscResourceName = 'MSFT_xWebVirtualDirectory'

try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_WebApplicationHandler.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xIISFeatureDelegation.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xIISHandler.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xIISLogging.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xIisMimeTypeMapping.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xSslSettings.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xWebAppPool.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xWebAppPoolDefaults.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xWebApplication.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xWebConfigKeyValue.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xWebConfigProperty.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xWebConfigPropertyCollection.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xWebVirtualDirectory.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/MSFT_xWebsite.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Invoke-TestSetup
{
try
{
Import-Module -Name DscResource.Test -Force
Import-Module -Name DscResource.Test -Force -ErrorAction 'Stop'
}
catch [System.IO.FileNotFoundException]
{
Expand Down

0 comments on commit bbc6aea

Please sign in to comment.