Skip to content

Commit f470c1d

Browse files
committed
Run test with verbose
1 parent 490402b commit f470c1d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

extensions/powershell/convert-resource.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ end {
2020
if ($lines.Count -ne 0) {
2121
$result = $scriptModule.invoke( { param($lines) Build-DscConfigDocument -Content $lines }, ($lines | Out-String) )
2222

23-
($result | ConvertTo-Json -Depth 10 -Compress) | Write-DscTrace Debug
24-
2523
return ($result | ConvertTo-Json -Depth 10 -Compress)
2624
}
2725
}

extensions/powershell/win_powershell.tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ BeforeDiscovery {
3333

3434
Describe 'PowerShell extension tests' {
3535
It 'Example PowerShell file should work' -Skip:(!$IsWindows -or !$isElevated) {
36-
Write-Verbose -Message $env:PSModulePath -Verbose
37-
3836
$psFile = Resolve-Path -Path "$PSScriptRoot\..\..\dsc\examples\variable.dsc.ps1"
3937
$out = dsc -l trace config get -f $psFile 2>$TestDrive/error.log | ConvertFrom-Json
4038
$LASTEXITCODE | Should -Be 0 -Because (Get-Content -Path $TestDrive/error.log -Raw | Out-String)
@@ -59,7 +57,7 @@ configuration InvalidConfiguration {
5957
dsc -l trace config get -f $psFile 2>$TestDrive/error.log
6058
$LASTEXITCODE | Should -Be 2 -Because (Get-Content -Path $TestDrive/error.log -Raw | Out-String)
6159
$content = (Get-Content -Path $TestDrive/error.log -Raw)
62-
$content | Should -BeLike "*Importing file '$psFile' with extension 'Microsoft.DSC.Extension/PowerShell'*"
60+
$content | Should -BeLike "*Importing file '$psFile' with extension 'Microsoft.DSC.Extension/WindowsPowerShell'*"
6361
$content | Should -Match "No DSC resources found in the imported modules."
6462
}
6563
}
@@ -69,5 +67,7 @@ AfterAll {
6967
Install-PSResource -Name 'PSDesiredStateConfiguration' -Version 2.0.7 -ErrorAction Stop -TrustRepository -Reinstall
7068
}
7169

70+
Write-Verbose -Message "Restoring original PSModulePath" -Verbose
71+
Write-Verbose -Message ($script:currentModulePaths) -Verbose
7272
$env:PSModulePath = $script:currentModulePaths
7373
}

0 commit comments

Comments
 (0)