Commit graph

5797 commits

Author SHA1 Message Date
Chunqing Chen 40eb3b3e13 Get-ChildItem <PATH>/* -file should include <Path> as search directory (#5431)
* get-childitem <PATH>/* -file should include <Path> as search directory

* [Feature] Added check for -Directory and more tests

* [Feature] Added check for the dynamic parameter type
2018-02-07 16:30:14 -08:00
Steve Lee 8b05408b1b Improve table view for Certs and Signatures by adding EnhancedKeyUsageList and StatusMessage (#6123)
* add EnhancedKeyUsageList to default table view of X509Certs
add StatusMessage to default table view of cert signatures

* set fixed width of 20 to Subject so more room for EnhancedKeyUsageList content
change EnhancedKeyUsageList to script to just show the friendly name
2018-02-07 15:29:48 -08:00
Travis Plunk 363c964ebd
add scripts to set/update the release tag in VSTS (#6107) 2018-02-07 15:24:34 -08:00
Christoph Bergmeister 88909811ff Msi installer: Add smoke test (#6105)
PR 6043 broke the installer (issue #6095). To prevent this from happening in the future, add a smoke test that installs the msi in appveyor build and make build fail if installation failed.
It uses the exit code to determine the success. The reason why it does not fail in the current state is because as I pointed out here, the failing custom action is not returning its exit code.
2018-02-07 15:00:42 -08:00
Dongbo Wang c0cb240ebd Update 'Restore-PSPester' to use 'Save-Module' (#6112)
Update Restore-PSPester to use 'Save-Module' to get the latest version of Pester.
We have moved to the latest version of Pester via PR #6064
2018-02-07 13:44:29 -08:00
Takuya Shibata 22014a923a Use 'RequireAdminOnWindows' tag in Set-Date tests (#6034)
* Use 'RequireAdminOnWindows' tag instead of 'Test-IsElevated' function.

* Fix incorrect condition of user privilege in Linux/macOS CI
2018-02-06 09:31:30 -08:00
James Truher [MSFT] 99a7d38cae Update test framework and tests to support 4x version of Pester (#6064)
* Test fixes and changes needed to support Pester 4.0.8

* Replace 'Should Contain' with new 'Should FileContentMatch' assertion

Explicitly check for string creation with write-output

* Use the current version of pester and install it in modulesDir

* Simplify logic for relative path test.

Multiple '..' is not needed for a relative path, a single one will do. Also, on multi-drive systems using split-path -noqualifier will probably do the wrong thing with regard to constructing a correct path.
Remove extraneous Should Not Throw test, if this throws, the test will fail, we don't need to explicitly assert the not throw

* In some environments it is possible that computer name is 'localhost', so that should be allowed

* [feature] Add link for migrating tests from Pester v3 to v4

Fix up capitalization and white space issues
Change one test to check FullyQualifiedErrorId rather than just `Should Throw`

* [feature] update invoke-item test to handle the case where multiple notepad processes are running

* Fix spelling issue with Pester 4x, calling it Pester 4 should be sufficient
2018-02-05 11:58:25 -08:00
Travis Plunk fa40a87bd7
Add registry value for easy detection (#6094)
Add registry value for easy detection. For example, the presence of a single key of 6.0.* x64. This is much faster than MSI detection.

Note there are currently two GUIDs, one for 6.0.* x64 and one for 6.0.* x86.

fixes #6090
2018-02-05 10:02:58 -08:00
Steve Lee 3a81c2b58f Enable setting PSSession Name when using SSHTransport and added Transport property (#5954)
When using New-PSSession -SSHTransport -Name ... the Name parameter wasn't being used when creating the remoterunspace so an automatically generated one was always created.
Fix is to explicitly pass the transport name when generating a runspace name including other transports like VMBus and Container.

Refactor runspace name generation code to produce "RunspaceN" and added a Transport property.

Tests will have to wait until we have the infrastructure for remoting tests and Enable-SSHRemoting work is complete.

Fix #5951
Fix #2426
2018-02-04 13:12:48 -08:00
Steve Lee 6ceaf92bf9 change logo to SVG (#6072)
Current README uses a PNG which doesn't scale for high dpi displays (starts to look fuzzy).
Created 64 pixel wide version of svg of the black logo and inserted into README.md.
Note that it currently doesn't render as the absolute URL points to master so that it gets
rendered correctly in other places where the README.md is used (like docker hub).
2018-02-02 18:35:59 -08:00
Mark Kraus 37780de9b7 [Feature] Remove -TimeOutSec from non timeout related tests (#6055)
The timeout mechanism should be supported by the test framework (Pester here).
2018-02-02 23:56:06 +04:00
Dan Travison 0191946fe3 Fix the filtering of analytic events on Unix platforms. (#6086)
- Remove previous `UseAlwaysAnalytic` workaround in `SysLogProvider.Log`
- Update Script Block logging to always log to the operational channel with `UseAlwaysOperational`
- Fix `PSChannel` on Linux to use a bitmask
- Handle `UseAlwaysOperational` and `UseAlwaysAnalytic` keywords but adding to `_keywordFilter` if the associated channels were selected in the configuration
2018-02-02 10:49:09 -08:00
Priyesh e172e17b9e Doc: Fix the command to build type catalog in internals.md (#6084) 2018-02-01 10:18:04 -08:00
Ilya ca4e4798fb Remove unsupported members from the enum 'Language' in Add-Type (#5829)
[breaking change]
Remove the unsupported members (various versions of CSharp and `JScript`) from the enum 'Language' in Add-Type. After this change, `Add-Type -Language` only supports `CSharp` and `VisualBasic`.
2018-02-01 09:25:20 -08:00
Mark Kraus 7d003f4f67 Change Web Cmdlet Tests to Use 127.0.0.1 not Localhost (#6069)
Change Web Cmdlets Tests to Use 127.0.0.1 instead of localhost due to dotnet/corefx#24104
This provides a decent speed boost to the WebCmdlet tests (Faster in dozens of times).
2018-02-01 08:26:05 +04:00
Ilya 05ca36463a Build: Update PowerShell to build with .NET Core SDK 2.1.4 (#6054) 2018-01-31 14:56:20 -08:00
Mark Kraus 47c4a0a74b Test: Add Verbosity and more accurate timeout implementation for Start-WebListener (#6013)
- Add verbosity to the WebListener when it fails to assist in troubleshooting
- Switch the WebListener initialization timeout to count cycles instead of using fixed dates to work around possible VM CI sleep/ issues.
2018-01-31 14:55:16 -08:00
Travis Plunk 1c5c7f5c3a
add comments about where most of the packages are from (#6016) 2018-01-31 12:16:48 -08:00
Daniel Llewellyn 7b27250479 Add Environment Variable override of telemetry (#6063)
Inspired by dotnet cli, and allows for Telemetry opt-out on packaging systems such as AppImage and Snapcraft where the filesystem is immutable.
2018-01-31 10:19:48 -08:00
Mathias R. Jessen e20f3bdac4 Fix "Pull Request Process" dead link (#6066)
Fix "Pull Request Process" anchor links in governance.md
2018-01-31 08:22:16 +04:00
Chris Duck 795c61125a Adds script to patch the shortcut working directory to the user's home folder. (#6043)
Update the shortcut created by the installer to use %HOMEDRIVE%%HOMEPATH% for the working directory.
2018-01-31 08:11:29 +04:00
Steve Lee bf691353ae new Issue-Announcement label (#6041) 2018-01-30 16:10:08 -08:00
Ilya 7f2ebd70c9
Resort parameter list in alphabetical order (#6052)
After #5920 we should reorder parameter list (#4989)
2018-01-30 07:56:00 +04:00
Travis Plunk bd865280f3
update processes to allow for coordinated vulnerability disclosure (#6042) 2018-01-27 10:28:33 -08:00
Benjamin Staneck 51dbfae0ff Rework Windows Start menu folder name (#5891)
Changes the Windows start menu folder name from ProductSemanticVersionWithName to ProductSemanticVersionWithNameAndOptionalArchitecture - now the start menu is `PowerShell` for all versions.
2018-01-26 08:14:55 +04:00
Travis Plunk 3a33be87a7 Merge branch '6.0.1' into master
# Conflicts:
#	docker/release/fedora27/Dockerfile
#	docs/installation/linux.md
#	docs/installation/macos.md
#	tools/metadata.json
2018-01-25 16:35:25 -08:00
Dongbo Wang 45bf1dc142
CI Build: Use TRAVIS_PULL_REQUEST_SHA to accurately get the commit message (#6024) 2018-01-25 13:42:49 -08:00
Dongbo Wang 875a12d3d1 Skip tests that use ExecutionPolicy cmdlets on Unix (#6021) 2018-01-25 11:18:21 -08:00
Travis Plunk 67c9ae47f8
update date on change log (#6023) 2018-01-25 10:55:17 -08:00
Mark Kraus 2f1aec1496 Fix .gitignore (#5991)
Use single '*' in file name /src/TypeCatalogGen/powershell*.inc
2018-01-25 15:23:07 +04:00
Dan Travison 43662809c7 Add '-settingsfile' to 'pwsh' to support loading a custom powershell config file. (#5920)
Support loading a custom `powershell.config.json` file via the command-line for use in testing.
This change supports replacing the default `powershell.config.json` file that's usually loaded from the `PSHome` directory with a custom version file.

The primary use-cases for this command-line option are as follows:
1. Allow the CI system to disable settings that impact test run times; such as disabling syslog usage on Linux and MacOS
2. Support testing of syslog and os_log without interfering with normal PowerShell operations during test runs via launching an instance with custom log settings.
2018-01-24 22:12:14 -08:00
Mark Kraus a36d58cf09 Add Simplified multipart/form-data Support to Web Cmdlets Through -Form Parameter (#5972)
- Adds -Form Parameter to Invoke-WebRequest and Invoke-RestMethod.
- Form Accepts any IDictionary.
- Keys are used as multipart/form-data field names (PSObject unwrapped and ConvertTo<String>(Object)).
- FileInfo values are added as StreamContent with application/octet-stream content type and the FileInfo.Name as the file name.
- Strings are treated as StringContent.
- Singe values are converted to string with ConvertTo<String>(Object) and treated as StringContent
- Top level collections are enumerated and converted as above. Nested collections are treated as a single value and converted accordingly.
- Form is mutually exclusive with -Body and -InFile.
- Per PowerShell-Committee decision, -Form makes no assumptions about the HTTP method used. It can theoretically be used with any method. User will need to manually supply -Method POST to post the form.
- ContentType and content related headers supplied to -Headers will be ignored/cleared as MultipartFormDataContent requires control of these headers.
2018-01-25 09:17:55 +04:00
Takuya Shibata f86371e347 Change Microsoft.PowerShell.Commands.SetDateCommand.SystemTime to struct. (#6006)
Change Microsoft.PowerShell.Commands.SetDateCommand.SystemTime class to struct and resolve the error in Set-Date cmdlet - SetLocalTime function is causing a parameter error (error code 0x00000057).
2018-01-25 07:54:27 +04:00
Greg Zimmerman 874f5c1a85 Return better error for 'pwsh -WindowStyle' on unsupported platforms. (#5975) 2018-01-24 14:00:57 -08:00
Paul Higinbotham 27099c3f57 Fix a NullReference exception in Enter-PSHostProcess (#5995) 2018-01-24 13:59:29 -08:00
Travis Plunk 488e395f34 Start using Travis-CI cache (#6003) 2018-01-24 13:56:42 -08:00
Travis Plunk e49a81fe00 tests: fix function to test for docker OS due to change to use linuxkit for mac (#5843)
* Also, fix syntax issues to allow to work with released Pester
2018-01-23 16:10:45 -08:00
Eli Uriegas 44793e306a Remove Fedora 25, Add Fedora 27 (#5984)
Fedora 25 was EOL on December 12, 2017

https://fedoramagazine.org/fedora-25-end-life/

Signed-off-by: Eli Uriegas eli.uriegas@docker.com
2018-01-23 15:42:58 -08:00
Travis Plunk 9fc7077e11
update 6.0.1 change log (#5937) 2018-01-22 18:33:30 -08:00
Aditya Patwardhan 5b5168d72e Revert "Pull PSReadLine from PSGallery" (#5986)
This reverts commit beffdcf94d.
2018-01-22 16:09:35 -08:00
Thomas Conté 7dcd4c83d9 Fix build/package/installation scripts for SLES (#5918)
Small changes to the SUSE installation script so that it allows installing on SLES 12+ in addition to openSUSE 42+
2018-01-22 14:58:17 -08:00
Travis Plunk a603cf3867
Update csproj files to the latest version of the package references (#5961)
* Add function which tells you packages which probably need to be updated
2018-01-22 12:06:50 -08:00
Jason Shirk beffdcf94d Pull PSReadLine from PSGallery (#5759)
Instead of building PSReadLine from this repo, pull it from the gallery using nuget cache.

This pulls v2.0 of PSReadLine which does have documented breaking changes from v1.2, but the risk is small - the features that have changed are typically only used in a profile and aren't used all that often anyway.

Fix #996

Hardcodes version of modules pulled from PSGallery
2018-01-19 18:15:09 -08:00
Dan Travison 65a4002990 Logging: Fix the escaped characters when generating '.resx' file from PowerShell ETW manifest. (#5892) 2018-01-19 08:55:20 -08:00
Dongbo Wang 4b09a93676
Update docs and scripts for PowerShell 6.0.1 release (#5938) 2018-01-18 15:07:43 -08:00
Mark Kraus febc1e8bd0 Stop HttpListener from running in WebCmdlet tests (#5921) 2018-01-18 14:07:06 -08:00
Mark Kraus bb8d5562c5 Merge and Sort BasicHtmlWebResponseObject and ContentHelper (#5720)
* Merge and Sort BasicHtmlWebResponseObject

* Merge and sort ContentHelper
2018-01-17 16:47:50 -08:00
Christoph Bergmeister c6be7bd863 Update recommended WiX toolset link to be generic to WiX 3.x but mention that latest version of 3.11 has to be taken (#5926)
* Update recommended WiX toolset link to be generic to WiX 3.x but mention that the latest version of 3.11 has to be taken.
2018-01-17 16:42:45 -08:00
Steve Lee 7437f3dd3a Encoding for New-ModuleManifest on all platforms should be UTF-8 NoBOM (#5923)
* encoding for new-modulemanifest on all platforms should be utf8nobom
* fix test
2018-01-17 16:37:53 -08:00
Christoph Bergmeister d3a775da9a Packaging: simplify building an installable package for Windows (#5871)
This is the continuation of PR 5499 that had to be abandoned due to a fatal merge conflict and I did not want to risk accidentally reverting recent fixes.

    Remove unnecessary/unused default for productGuid because it always gets a new Guid when being called from Start-PSPackage
    Add defaults for required files but also add extra path validation attribute
    Rename ProductGuid to ProductCode
2018-01-17 15:34:03 -08:00