Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-3347

Windows module autoloading can cause spec test failures in Powershell Module

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: powershell
    • Labels:
      None
    • Environment:
    • Template:
    • Acceptance Criteria:
      Hide

      The spec test for Verbose output should be resilient to autoloading modules which also emit Verbose statements.

      Show
      The spec test for Verbose output should be resilient to autoloading modules which also emit Verbose statements.
    • Story Points:
      1
    • Sprint:
      Windows 2016-06-01

      Description

      During MODULES-3137 it was found that module autoloading behaviour can cause a spec test to fail, in particular spec/integration/puppet_x/puppetlabs/powershell_manager_spec.rb:144

      In this case the Microsoft.PowerShell.Utility at

      C:\windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psm1
       
      ...
      ...
      Export-ModuleMember -Function Get-FileHash
      Export-ModuleMember -Function New-TemporaryFile
      Export-ModuleMember -Function New-Guid
      Export-ModuleMember -Function Format-Hex -Alias fhx
      Export-ModuleMember -Function Import-PowerShellDataFile
      Export-ModuleMember -Function ConvertFrom-SddlString
      

      was causing extra Write-Verbose statements to be emitted by the module. The spec test should be modified to be accepting of autoloading verbose messages

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              glenn.sarti Glenn Sarti
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support