-
Notifications
You must be signed in to change notification settings - Fork 98
Fix tests errors being written out to output #568
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
Merged
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
PaulHigin
approved these changes
Dec 9, 2021
anamnavi
added a commit
that referenced
this pull request
Sep 7, 2022
* for errors being written in Save write to a variable * for Uninstall, fix errors being written * add more verification that Install step also worked
PaulHigin
added a commit
that referenced
this pull request
Jan 10, 2023
* Create private cancellation token in InstallHelper (#422) * Remove unneeded PR trigger and enable tests on Linux and macOS platforms (#424) * Remove unneeded PR trigger * Enable tests on Linux and macOS * Update README.md (#423) * Add updates to complete Tests for Install, Save, Publish, Get-Installed, and Uninstall tests. (#420) * Ensure URI creation is cross platform compatible (#421) * change URI creation, and resolve Unix tests * Add fix for failing unix tests (#426) * Update cmdlet (#407) * Set up CI with Azure Pipelines [skip ci] * Set up CI with Azure Pipelines [skip ci] * Set up CI with Azure Pipelines [skip ci] * create new src directory * create new test directory * Begin refactoring Install * Fix bug in GetHelper class related to debug statement * Major refactors to Install helper * Update utils class * incorporate bug fixes * Add install bug fixes and tests * Update project to C# 7.2 * Add scope tests * create new src directory * made changes to paths created in InstallHelper and use Scope as string * Incorporate bug fixes for accept license, scripts, and installation paths * Add more install tests * remove comments used for debugging earlier * Clean up code and tests * remove some files accidentally added * Change scope to be a an Enum type * Delete azure-pipelines-1.yml * Delete azure-pipelines-2.yml * Delete azure-pipelines.yml * Address bugs introduced from changing Scope type to enum * Incorporate review feedback, clean up code a bit * Remove input object parameter * Remove string comparison in install helper Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Update src/code/PSResourceInfo.cs Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Address some code review suggestions * Add comments and incorporate other code review changes * add tests for Update * Add save functionality * Update InstallHelper with Save changes * remove NoClobber as Update parameter * Update src/code/InstallPSResource.cs Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Incorporate further code review changes * add IsPRerelease to AdditionalMetadata * resolve prerelease label issue * fix merge conflicts in tests * pull in Install test from master * pull in PSGetTestUtils form master * add helper for filtering wildcards that handles * * fix failing tests * resolve feedback from PR * add code to skip if not windows tests * rename Utils helper method and remove unecessary comments * add SupportShouldProcess * fix tests for updating with Scope, and use Get-InstalledPSResource instead of Get-Module * revert change to TryParseVersionOrVersionRange * remove cancellationToken * remove PSGalleryName variable not needed * update design and help docs for UpdatePSResource * remove comments from Update tests * remove call to Register-LocalRepo helper as is not needed * add test for AcceptLicense paramter * update test with AcceptLicense * update Install test for AcceptLicense * add whatIf test to update * resolve PR feedback and add skip to Unix AllUsers scope tests * remove references to NameParameterSet * add fix for failing MacOS tests Co-authored-by: alerickson <25858831+alerickson@users.noreply.github.com> Co-authored-by: Amber Erickson <americks@microsoft.com> Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Install should implement ShouldProcess (#425) * Install should impelement ShouldProcess * Preview tag support (#428) find prerelease version if version contains tag but prerelease parameter not used * Find tests (#429) * add tests for FindPSResource package name with wildcards and version combinations * add test for invalid wildcard character names * Temporarily remove unimplemented DestintationPath parameter (#431) * Wildcard processing (#432) make wildcard support/error handling consistent across cmdlets * Update help files for {Update, Find}-PSResource and {Register, Set, Get, Unregister}-PSResourceRepository (#434) update help docs * Update help files for {Get-Installed, Install, Publish, Save, and Uninstall}-PSResource (#435) * Update PSGet documentation link in readme (#437) * Replace WriteDebug() with WriteVerbose() (#438) remove WriteDebug() * Update module version to use new form (#439) * Update version to new form * Add missing copyright header * Change 'APIKey' to 'ApiKey' (#443) * Update help documentation for minimum inclusive version range (#442) * update help files with note about minimum inclusive version not being supported according to NuGet version documentation * Update NuGet libraries to stable version (#445) * Fix bug with Publish-PSResource not properly adding tags to nuspec (#448) * add ShouldSupport implementation for Save-PSResource (#447) * make support for Artifactory more generalized (#446) * Auto-create PSResourceRepository.xml file if the file does not already exist. (#450) * add issue template (#452) * Update changelog (#453) * Support Azure Artifacts for PowerShell modules (#449) PowerShell modules should be supported for Azure Artifacts feeds * Add clarifying comments to util functions (#454) * fix minor typo in release yml (#455) * Command dsc parametersets (#490) Implement CommandName and DSCResourceName parameter sets * Tag type paramset (#478) implement Tag and Type parameter set for Find * Remove unnecessary .nupkg.metadata from module after installation (#500) * Fix failing tests on Windows when not an admin (#502) * Update README.md (#503) * Add Sbom to release package (#507) * Fix bug with some modules installing as scripts (#504) * Value from pipeline cleanup (#511) Cmdlets should only have ValueFromPipeline and/or ValueFromPipelineByPropertyName attributes per the cases discussed * Add InputObject parameter sets for appropriate *-PSResource cmdlets, to provide pipeline support (#510) Add InputObjects for {Install, Save, Uninstall}-PSResource cmdlets. * Fix CI to use latest ubuntu image (#527) * Fix test image (#528) * Add CI notice generator (#529) * change Find-PSResource tests to not test against production package Carbon (#530) change Find tests to not test against production package Carbon * Fix for Install-PSResource always reinstall issue (#525) * Fix for always reinstall issue and general clean up * Added restore option for reinstall, in case the install fails * update error message to mention repo name, also clean up some success/fail messages (#531) * Uninstall and Get-Installed prerelease support for Version parameter (#523) implement prerelease versioning search support for Get and Uninstall * Add -NoClobber functionality to Install-PSResource (#509) * Implement -DestinationPath parameter for Publish-PSResource (#506) * Updates for Update-PSResource (#534) * Changes to UpdatePSResource command * Add stop processing to UpdatePSResource. Removed multiple instantiations of helper objects. * Reverting to original source * Create InstallHelper object only once. * Fix Publish-PSResource -DestinationPath test failure (#537) * Fix clobber tests (#539) * Uri bug fix (#542) * Use Utils.DeleteDirectory consistently (#544) * Change all instances of 'Get-InstalledPSResource' to 'Get-PSResource' (#545) * Code clean up pass (#547) * Remove unneeded Microsoft.Extensions.Logging (#546) * Use path separator to split PSModulePath env var (#541) Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * More code clean up for next release (#548) * Add -SkipDependencyCheck to cmdlets. (#550) * Add -SkipDependencyCheck to install/save/update cmdlets * Change -Force to -SkipDependencyCheck * Fix tests * Implement Progress Bar for Install (#552) Add progress bar for install * Bug fix for Publish-PSResource deleting a temp dir that contains a readonly file (#543) * Add -PassThru to Install-PSResource, Save-PSResource, and Update-PSResource (#540) * Add -AsNupkg and -IncludeXML params and test (#538) * Remove DSCResources from PowerShellGet (#553) * Add -PassThru support for Unregister-PSResourceRepository (#556) add PassThru to Unregister-PSResourceRepository cmdlet * Fix CI after removal of DSC modules (#557) * Implement -Quiet param for Install and Update -PSResource (#561) * Update help documentation (#558) * Install should not silently fail (#554) install should not fail silently * Tests and error handling (#564) clean up tests and add tests for certain errors * Update change log for beta 12 release (#567) * Update change log for beta 12 release * Fix progress bar and test issues * Fix tests errors being written out to output (#568) * for errors being written in Save write to a variable * for Uninstall, fix errors being written * add more verification that Install step also worked * Suppress progress bar during testing (#569) * Add new SBOM parameters (#579) * Add support for credential persistence (#480) add support for credential persistence * rename PSResourceInfo PrereleaseLabel property and variables to Prerelease (#591) * Implement RequiredResourceFile and RequiredResource parameters (#592) * Update release build image (#600) * Fix Write-Error on build failure. (#601) * Rename params: *url to *uri (#551) Rename params *url to *uri * Update tests to use PowerShell pipeline cmdlets (#570) * Add support for Uninstall-PSResource (#593) Add support for Uninstall -Prerelease parameter uninstalling only prerelease versions * Allow .psd1 to be passed into -RequiredResourceFile (#610) * Refactor tests to use test modules from PSGallery, not PoshTestGallery (#628) * remove PoshTestGallery from repositories xml file used during tests as it won't be able to search it * Add -Scope parameter to Get-PSResource and Uninstall-PSResource (#639) * Change -Repositories param to -Repository in Register-PSResourceRepository (#645) * Bug fix for publishing modules with RequiredModules specified in .psd1 (#640) * Update Uninstall-PSResource.md * Update Get-PSResource.md * Update Get-PSResource.md * Update Uninstall-PSResource.md * Update Update-PSResource.md * Update Save-PSResource.md * Update Install-PSResource.md * Update Set-PSResourceRepository.md * Update Register-PSResourceRepository.md * Update tests for Publish-PSResource (#648) * Publish-PSResource Script publishing support (#642) support/bugfixes for publishing scripts * Update Install-PSResource.md * Update Install-PSResource.md * Update Install-PSResource.md * Update Find-PSResource.md * Update Find-PSResource.md * Update PowerShellGet.dll-Help.xml * Update Get-PSResource.md * Update Get-PSResource.md * Update Install-PSResource.md * Update Update-PSResource.md * Update Install-PSResource.md * Update Save-PSResource.md * Update Update-PSResource.md * Help updates for Preview 13 release (#651) * add SupportsWildcard attribute for info to appear in help (#658) * Update changelog and pkg version for 3.0.13-beta release (#659) * Psresourcerepository file bug (#661) fix Uri/Url not being null checked * Update changelog, release notes for version 3.0.14-beta14 (#663) * Update prerelease tag to 'beta14' * Add authenticode validation to Install-PSResource (#632) * Update nuget client dependency packages (#678) * Update PSData file reader. (#681) * Add tests for New-PSScriptInfoFIle, Update-PSScriptInfoFile, and Test-PSScriptInfoFIle (#683) * Add benchmark tests for v3 (and v2) performance (#690) * 'Update-ModuleManifest' cmdlet implementation (#677) * Add `.github/fabricbot.json` (#682) * Add some code clean up changes (#703) * Some minor code clean up * Update comments * Downgrade NuGet client packages to v5.11.2 (#719) * Script info cmdlets with Line parsing and class implementations (#708) Script info cmdlets with Line parsing and class implementations * Add help docs for New,Update,Test-PSScriptFileInfo cmdlets (#689) * Update PowerShellGet.dll-Help.xml * Update PowerShellGet.dll-Help.xml * Script file duplicate keys and parsing help comment block (#726) Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Update Find-PSResource.md * Update Get-PSResource.md * Update Install-PSResource.md * Update New-PSScriptFileInfo.md * Update Publish-PSResource.md * Update Register-PSResourceRepository.md * Update Save-PSResource.md * Update Set-PSResourceRepository.md * Update Test-PSScriptFileInfo.md * Update Uninstall-PSResource.md * Update Unregister-PSResourceRepository.md * Update Update-ModuleManifest.md * Update Update-PSResource.md * Update Update-PSScriptFileInfo.md * Update Install-PSResource.md * Update Find-PSResource.md * Update PowerShellGet.dll-Help.xml * Update pkg version, changelog, release notes for 3.0.15-beta15 release (#725) * Fixes for use of IEnumerable and dependent module re-install issues (#728) * Remove unneeded IEnumerable interfaces * Add missing clean up * Fix always reinstall * Fix logic error * Style change * Minor clean up * Use count property * Update NuGet.Packaging to version 6.2.1 (#733) * updat NuGet.Packaging to version 6.2.1 which depends on Newtonsoft 13.0.1 or higher * update other NuGet package versions * Update pkg version and notes for release (#734) * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Copy LICENSE and Notice.txt to build output path (#735) * Remove ShouldProcess in FindPSResource * Copy LICENSE and notice.txt to output path in yamls * Update .ci/ci_auto.yml Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Update .ci/ci_auto.yml Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Update .ci/ci_release.yml Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Update .ci/ci_release.yml Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Update ci_release.yml for Azure Pipelines * Remove unneeded copy (#736) * Add error message for failure to install after choosing not to trust repository (#712) * Remove ShouldProcess from FindPSResource (#710) * Add OutputType attributes to Get-PSResource and Get-PSResourceRepository (#706) * Add PSModulePath paths when retrieving resource paths (#700) * Remove .nupkg.metadata file (#738) * Change "IncludeXML" to "IncludeXml" (#739) * Cannot assume PSScriptInfo metadata will have empty lines in between (#744) * for PSScriptInfo metadata not assume first line will be empty line and can be ignored * add test scripts without empty lines * Change ConfirmImpact from Medium to Low * Change default path to CurrentFileSystemLocation (#742) * Fix -PassThru to return all properties * Delete commented code * Add ValueFromPipelineByPropertyName to Set-PSResourceRepository (#705) * Fix typo Co-authored-by: Anam Navied <anam.naviyou@gmail.com> * Editorial pass on cmdlet ref (#743) * Check Uri before setting the new value * refactor updating user uri * Update priority range for PSResourceRepository to 0-100 (#741) * Add -Force param to Register-PSResourceRepository and Set-PSResourceRepository (#717) * Bug fix in Publish-PSResource when creating nuspec (#693) * add error for failure of Uri creation * add temporary path parameter to save * Change error message * add TemporaryPath parameter to Install and Update * add parameter attribute * revert unintendded change * rename FilePath parameter to Path * update .md files to Path instead of FilePath * update test files to use Path instead of FilePath * Change wording Co-authored-by: Anam Navied <anam.naviyou@gmail.com> * Change wording Co-authored-by: Anam Navied <anam.naviyou@gmail.com> * remove toString() Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * throw error for wildcard usage and unresolved path * update .md files to add a new parameter * Add String and SecureString to acceptable credential types in PSCredentialInfo (#764) * Expand acceptable Path arguments for Publish-PSResource (#704) * remove inheritance and fix test * fix code style * fix test for UpdatePSResource * Update test/InstallPSResource.Tests.ps1 Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * use should throw instead of try/catch * Fix RequireModules description & add Find example (#769) * change path handle * delete test * Script file validation and metadata properties population for Publishing, Installing a script. (#781) * for Publish script validation use validation code from PSScriptFileInfo methods * for Install, script validation should use PSScriptFileInfo methods and also populate PSResourceInfo with metadata information accessible * Install-PSResource: Installation path for scripts not included in environment PATH variable (#750) * when installing script ensure that Script InstallPath is added to env Path variable so script can be invoked without prepending install folder path * add prompting for setting env var, add scope based env var setting, and pass scope to InstallHelper * InstallHelper should take ScopeType? param, use Path.PathSeperator for cross platform compat, and add tests * instead of prompt, use ShouldProcess for modiying user's environment variable * Update src/code/InstallHelper.cs Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Update src/code/InstallHelper.cs Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * detect if Script install path is not in environment PATH for appropriate scope and present warning and revert install tests * simplify scope based determination of environment PATH variable Co-authored-by: Paul Higinbotham <paulhi@microsoft.com> * Update CHANGELOG.md for beta17 (#782) * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Anam Navied <anam.naviyou@gmail.com> * Release 3.0.17 (#783) Co-authored-by: Alyssa Vu <alyssavu@microsoft.com> * Update PowerShellGet.dll-Help.xml (#784) * replace exposed hardcoded test secrets with random one (#785) * Missed one case of hardcoded test passwd. (#786) * Remove unneeded constructor tests (#787) * Remove unneeded test. (#788) * Update PSGet module version Co-authored-by: alerickson <25858831+alerickson@users.noreply.github.com> Co-authored-by: Anam Navied <anam.naviyou@gmail.com> Co-authored-by: Amber Erickson <americks@microsoft.com> Co-authored-by: Steve Lee <slee@microsoft.com> Co-authored-by: Keith Jackson <8988864+keithallenjackson@users.noreply.github.com> Co-authored-by: Sydney Smith <43417619+SydneyhSmith@users.noreply.github.com> Co-authored-by: Cansu Erdogan <cnserd@gmail.com> Co-authored-by: Freddie Sackur <github@dustyfox.uk> Co-authored-by: msftbot[bot] <48340428+msftbot[bot]@users.noreply.github.com> Co-authored-by: Alyssa Vu <alyssavu@microsoft.com> Co-authored-by: Alyssa Vu <49544763+alyssa1303@users.noreply.github.com> Co-authored-by: Sean Wheeler <sean.wheeler@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Summary
Errors being written due to tests should be written to an error variable and surpressed.
PR Context
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.