This repository was archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
PR of pester quiet param fix and usebaicparsing for some pester tests. #29
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Avoid using extra call to get-module for performance reasons. - Fix for quiet versus show Pester parameter when -TestFilePath parameter is used with OVF.
Added the -UseBasicParsing parameter in order to be compatible with running tests with a user that haven't had IE configured. Invoke-webrequest can then not parse the DOM as IE is used for this.
This look good to me @larssb. Thanks!
CLA assistant check
All CLA requirements met.
Finally signed. I hope it will a breeze to merge it.
@devblackops have a good 1.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Description
Fixed the combination of using the OVF -TestFilePath parameter with invoke-pester -quiet or -show. The code, when using the -TestFilePath parameter did not take into consideration the version of Pester and therefore the warning about -Quiet.
While running the Pester tests. Several tests failed as I was using a user through "Runas" while in a Windows user session that is a non-admin user. The "Runas" user does not have IE configured in its profile and therefore the invoke-webrequest cmdlet fails without the -UseBasicParsing parameter. I added that to several tests to avoid this error. Shouldn't be an issue as it is very simple requests via that is tried with invoke-webrequest.
Related Issue
#28
Motivation and Context
To get rid of an unnecessary warning. That is already fixed for other parameters in OVF.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
This change is Reviewable