-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add Microsoft.Windows.Assertion Module #90
base: main
Are you sure you want to change the base?
Conversation
resources/Microsoft.Windows.Assertion/Microsoft.Windows.Assertion.psm1
Outdated
Show resolved
Hide resolved
resources/Microsoft.Windows.Assertion/Microsoft.Windows.Assertion.psm1
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
Didn't realize I still have scriptanalyzer errors |
This comment has been minimized.
This comment has been minimized.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Hmmmmmm |
@ryfu-msft - I'm a bit stuck here and don't know how to go about it. When I run the pester tests locally, I see them pass -
I even went to a completely different computer, checked out the repo, and ran the tests, where they all passed.
Then, I used As a final effort, I opened up a new Windows Sandbox, mapped in the folder from Git, installed PowerShell 7, and tried running the tests. They all passed again -
Can you help me understand why the pipelines are showing different results? Are they using a specific version of Pester? |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Trenly, maybe this helps: You can run it through Azure Pipelines itself. I had a similar problem, but this was related to a PowerShell module not being available on the hosted agents (see #120). If you want, you can always hit me up to give it a try. Cheers. |
Are you saying that the module for |
No, that's not actually what I was referring to. What I wanted to refer to is that I made an assumption that you hadn't tried running the test on an Azure Pipelines hosted agent. I have seen some strange cases now where some things are available on your local machine (or sandbox) but slightly behave differently on the hosted agents. That's why I wanted to run it through the agent itself and see what it was doing. The pipeline running in this repository doesn't always output the verbosity message you might have sought. And I think the P.S. The tests were run under Pester v5.6.1. |
|
||
<# | ||
.Synopsis | ||
Pester tests related to the Microsoft.WinGet.Developer PowerShell module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Should be Microsoft.WinGet.Assertion
Premise
Until DSC v3 is released, there isn't a good way to assert specific system parameters in DSC - Especially for use with WinGet. This module adds several different DSC Resources that can be used for asserting the state of a system, primarily for use in WinGet configuration files. This will allow DSC users in enterprises to target specific architectures, specific domain roles, computers with specific print servers, etc. by adding these assertions directly into their configuration YAML instead of having to push out a wrapper script that performs the checks before invoking the DSC, and without having to write their own implementations using the
Script
DSCResource.