Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-WmiObject is not included in the SafeCommands table #768

Closed
it-praktyk opened this issue Mar 31, 2017 · 3 comments
Closed

Get-WmiObject is not included in the SafeCommands table #768

it-praktyk opened this issue Mar 31, 2017 · 3 comments
Milestone

Comments

@it-praktyk
Copy link
Contributor

 Describing SafeCommands table
    [-] The SafeCommands table contains all commands that are called from the module 451ms
      Expected: {}
      But was:  {Get-WmiObject}
      at <ScriptBlock>, C:\Users\<USERNAME>\Pester\Pester.Tests.ps1: line 112
      112:                 $missingSafeCommands | Should Be $null

To find/confirm that bug you need first correct the line 89 or 91 in the file Pester.Tests.ps1.

Pester version : 4.0.3 C:\Users<USERNAME>\Pester\Pester.psm1
PowerShell version : 5.1.14393.953
OS version : Microsoft Windows NT 10.0.14393.0

@it-praktyk
Copy link
Contributor Author

The related issue #712 .

Why the updated test doesn't throw for Import-LocalizedData too ?

@it-praktyk
Copy link
Contributor Author

Today, after merging c3d84de I tested code once again and I see that issue described here is the only v3 related.

Confirmed on

Pester version     : 3.4.6 C:\Users\Wojtek\Documents\Scripts\2 - GitHub Extenal\Pester\Pester.psm1
PowerShell version : 5.1.15063.483
OS version         : Microsoft Windows NT 10.0.15063.0

But the open question is why the test corrected like here: #766 (comment) doesn't throw an exception for v4 - like in the issue #712

@nohwnd, please remove it from the V4 milestone. I'll prepare an update for V3Maintenance soon.

@it-praktyk
Copy link
Contributor Author

I see that I previously missed fulfilling of description.

Occurrences of Get-WmiObject in the Pester code.

I analyzed it again and assume that the issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants