- Updated Restore-PSModule function to delete the PSGetModuleInfo.xml so that this file will not be included in the PowerShell release.
- Since PackageManagement module gets installed with PowerShellGet module, removed PackageManagement module name in Restore-PSModule command invocation.
# The first commit's message is:
Changed to PSModuleRestore switch, i.e., by default no PSModule install
# This is the commit message #2:
install PowerShell modules to publish folder as well as one level up
# This is the commit message #3:
removed workaround
* added type to returned objects
replaced expand-ziparchive with call to Archive module
added defaults to location of opencover.xml, opencover installation, powershell.exe, and location of tests
updated error messages with corrective action
replaced System.Net.WebClient call (not available on coreclr) with invoke-webrequest
scoped change of executionpolicy to process when starting pester to avoid error if system policy is less restrictive
updated version of module
* addressing code review feedback
- check for git before using
- check for opencover.console in path
- fixed path to code coverage build of PS
* added Expand-ZipArchive back to support psv4 scenario
* Add support W3C Extended Log File Format
1. Add support W3C Extended Log File Format
2. Refactoring Import-Csv tests
3. Add #Type tests
* Fx test after review
* Fix tests after review
* Remove unneeded test
* Added tests to close code coverage in CIM area
Added CimAdapter.Tests for adaptation layer (code cribbed from BVT tests)
Added SessionOption.Tests.ps1 (Code cribbed from BVT tests)
Modified CimClass tests by adding more tests
Added CimSession.Tests for basic tests of New-CimSession cmdlet
Added CimInstance.Tests for basic tests of Get-CimInstance
* Add CI tags to tests
* unify test execution to use try/catch for marking tests as skipped
moved test which retrieves cimclass via method to feature as it is not
a common operation, this test can take some time as well
* Write-Information accept objects from the pipeline
* Add test
* Fix test
Remove unneeded runspace.
* Clear streams before each test case
Streams of the PowerShell instance might have records from other test runs. Clear the streams before each test case.
When running on systems that do not support a virtual terminal,
the tests was incorrectly assuming escape sequences were removed.
The fix is to expect different results depending on whether or not
the host supports virtual terminal mode.
If a response to invoke-webrequest does not set the content type in the
response header, an object not set exception is thrown in
WebResponseHelper.CoreClr.cs. Updated to set contenttype = null.
People use Out-Null despite much faster alternatives:
$null = Do-Stuff
[void] = Do-Stuff
Do-Stuff > $null
This change makes Out-Null work in roughly the same say as the above.
The optimization is to detect that we're calling the built-in Out-Null
cmdlet when invoking a pipeline from script (the change won't have any
effect in the PowerShell api). If we detect Out-Null, we rewrite the
pipe to look similar to `Do-Stuff > $null`.
* Add OpenCover PS Module to collect code coverage
OpenCover PS Module helps is collecting Code Coverage using the OpenCover
toolset. The module helps in comparing two code coverage runs as well.
* Change OpenCover.psd1 to ASCII
* Fix an error in path for OpenCover
Fixed an error on path for OpenCover. Also used ZipFile class instead of
cmdlet as it might not be available on CI system.
* Convert module to be Powershell v4 compliant
Changed implementation from classes to PSObjects and implemented
Expand-ZipArchive.
* Added CodeCoverage as a configuration to project.json files
Added CodeCoverage as the new configuration for all the project.json
files. When Start-PSBuild is executed with configuration as CodeCoverage,
we change the degubType to 'full' as required by OpenCover toolset.
Also made changes to appveyor.psm1 to build a CodeCoverage package on
daily builds and publish it as a zip.
* Addressed code review comments
Changed from Add-Member to use pscustomobject type accelator. Removed
[gc]::collect.
* Added explicit garbage collection
* Addressed code review comments
- Make sure that the build Start-PSPackage gets is not a code coverage
build
- Add debugType = full for FullCLR
- Remove configurations from PackageManagement files as it is not needed.
- Build CodeCoverage build first in AppVeyor.
* Resolve merge conflict
* Fix indentation
* Fix newline at end of file
* Added command discovery for locating OpenCover.console.exe
* Wire up proper ConsoleHostRawUserInterface.LengthInBufferCells for Unix
Ref https://github.com/PowerShell/PowerShell/issues/2502
This allows for Unix console host to properly calculate display width for
strings containing escape sequences (e.g. ANSI color), rather than
falling back to naive string.Length.
* Add basic tests for host LengthInBufferCells calculation
* Added -Top/-Bottom params to Sort-Object for Top/Bottom N sorts; added many Pester tests
* updated changelog
* updated CHANGELOG.md
* replaced Get-Service with Get-Alias in Pester tests
* improved performance for -unique -top/-bottom, changed according to PR feedback
* added newlines to end of two files
* Removed whitespace changes
* Missed 2 whitespace changes to undo in last commit
* Updated to try to resolve merge issue
* change heapify return type, cleaned up test code
* unique top/bottom N sorts are now 2-3 times faster
* code cleanup (removed unused vars, simplified logic)
* Enable WebRequestPSCmdlet to not validate HTTPS certificates
Added switch parameter IgnoreCertificateCheck to WebRequestPSCmdlet to enable Invoke-WebRequest and Invoke-RestMethod to not validate the HTTPS certificate of the server if required.
* Changed IgnoreCertificateCheck parameter name to NoCertificateCheck
Changed the switch parameter IgnoreCertificateCheck to NoCertificateCheck for WebRequestPSCmdlet to enable Invoke-WebRequest and Invoke-RestMethod.
* Changed NoCertificateCheck parameter name to SkipCertificateCheck
Changed the switch parameter NoCertificateCheck to SkipCertificateCheck for WebRequestPSCmdlet to enable Invoke-WebRequest and Invoke-RestMethod.
* Added test for SkipCertificateCheck parameter
Validation of SkipCertificateCheck parameter in Invoke-WebRequest and Invoke-RestMethod. First validating, that exception is thrown for HTTPS URI with expired certificate. Then validating, that no exception is thrown if SkipCertificateCheck parameter is used. HEAD method must be used for Invoke-RestMethod to not return any body. Invoke-RestMethod can't parse the HTML returned when using GET method.
* Updated test for SkipCertificateCheck parameter to use ExecuteWebCommand function
There was a NullReferenceException after turning on constrained language mode
if creating a binding on a thread with no runspace.
The fix is to assume if there is no runspace that we are not in constrained language
mode, and also generate a binding restriction that assumes the same.
Resolving #2570.
Ignore drive paths in the check. If the input is a drive path,
then "\" is passed as the path to GetDriveQualifiedPath with drive info.
Since, the path here starts with "\", treatAsRelative is set to false
which prevents further formatting of this path.
The check is only valid for PSDrives with root path equals to UNC paths or the paths
in unix.
There are mainly 2 changes:
1. When '-ExcludeProperty' is specified but '-Property' is not, use "*" as the default value for '-Property'.
2. Allow 'Select-Object -Property noexist-name' to return a PSObject with property noexist-name, unless noexist-name itself contains wildcards.
* Fixes#2534 by replacing expensive WMI query with Win32 API calls
* fix break on unix build
* added tests for #2535
* although test passed, fixing exception that shows up
* fixed Describe text
* addressing code review feedback
* addressing review feedback to comment on why sleep is needed
added check that test processes are created before we try to kill them
* fixed test to timeout and pending fix for #2561
Resolving #2206
Set-Content fails to create a file for PSDrive path, if the path root
begins with defaultPathSeperatorString (ex: UNC path and paths in Single
rooted filesystems like Unix)
* Add support <Suppress> in Get-WinEvent -FilterHashtable
1. Add support <Suppress>
2. Refacrtoring BuildStructuredQueryFromHashTable() to use StringBuilder
3. Add tests
* Changelog
In PS Core on windows, we try to locate the default web browser and use it for online help. If we cannot find the default web browser (in NanoServer/IoT), we error out.
* Fix host remote test InvokeOnRunspace to work with AppVeyor
* Updated to use new local account for remoting tests.
* Set the LocalAccountTokenFilterPolicy as needed.
* Adding verbose messages for debugging.
* Storing creds using Export-CliXml
* Added CITravis skip for Windows only remoting test
* Moving tests back to 'Feature' scope
* Added AppVeyor environment variable check to prevent account creation on non-appveyor configurations
* Removed It block in BeforeAll block
* Moving tests back to 'Feature'
Fix Get-WinEvent -FilterHashtable to work with named event data field
Now FilterHashtable parameter in Get-WinEvent for named data field:
1. generates a valid query, ex. @{Logname="System";Param="a"}
2. generates a valid query for multiple values, ex.
@{Logname="System";Param="a","b"}
Also removed double cast in the original code and added more tests to cover the fixed scenarios.
CategoryInfo.Activity of Write-Error does not honor the value for
'activity' but uses the hard-coded string 'write-error'. The change sets
the value if specified by Write-Error cmdlet or set 'write-error'.
PowerShell can be started with input redirected in different scenarios.
`powershell -Command -` is one scenario where commands are sent to
PowerShell, but this is not a interactive shell scenario, it's really
a server to run commands from some other process.
`powershell -File -` or just regular redirected input means PowerShell
is an interactive shell, but command line editing must be done via
the redirected standard input handle instead of interacting directly
with a console handle.
In this scenario, we want to provide a good editing experience. Today,
we provide the bare minimum, supporting backspace but no cursor movement.
The bug here is that backspace was treated as a backspace in the server mode
but should not have been.
1. Added parameterbinding test
2. Added ShouldBeErrorID function in helper file
3. Removed ShouldBeErrorID function from other test modules
4. Update New-TestHost to be able to run on full CLR
5. updated file map.json
* Update CredentialCommands.cs
Added possibility to add title to the credential prompt window.
Added possibility to only supply username without giving a message.
* Added Test for Get-Credential new feature. (Title, and Message only optional.)
* Use a variable (which can be indexed by line) instead of a file to
test the output of arguments passed to echoargs
* Add comments explaining the tests
* Rename Publish-EchoArgs to Publish-PSTestTools so it can be used
for other tools as well in the future
* Publish EchoArgs to the bin directory instead of run to match
convention
* Add source URL to EchoArgs header comment
* Use wildcard of "*.nuget.props" to match
"test/csharp/csharp.nuget.props" in .gitignore
Also includes these bugfixes:
- WSManConfigProvider.GetHelpMaml: Tried to load XML from
MemoryStream that was created from file name string. Use XmlReader
instead.
- WSManConfigProvider.GetHelpMaml: Use Path.Combine instead of
platform-specific directory separator character.
- WSManConfigProvider.GetHelpMaml: CmdletHelpPath MAML XML element
attribute `ID` name casing seems inconsistent with other help.xml
files. XPath 1.0 does not support case-insensitive expressions,
use both `id` and `ID` in query.
- Add Pester test to verify that Get-Help shows provider-specific help.
Fixes#2088
The input loop reading from stdin did not handle multi-line input correctly
because it was adding a newline character where none was expected.
The fix was to not include the final newline character to accept input,
just like Console.ReadLine or PSReadline would.
this one is a bit tricky, unless you're elevated you can't set the date
however, if you are not elevated you should get an error. This file
does one or the other based on whether you're elevated
* 1. Update PowerShellGet to install the modules and scripts to proper locations in PowerShell Core on Windows. 2. Added few CI tests for PowerShellGet
* Handling the scenario of FullCLR-based PowerShell on Windows.
* [build.psm1] - mc.exe input file needs quotes
For filenames that have spaces or paths to that file that have spaces, the input filename needs to have quotes around it.
* Quoted more paths so tests run from directories with spaces
Found a few locations where paths weren't qutoed or escaped with '& ...' that are needed to get tests to run from build directories with spaces in them.