Commit graph

5256 commits

Author SHA1 Message Date
Ilya a4cdb806f4 Exclude directories discovered from '-Path' in Select-String (#4829)
Select-String can search in files only so we should skip directories.
2017-09-14 14:57:17 -07:00
bergmeister d804d7fd30 Make the build output the WiX compilation log if it failed. (#4831)
* Make the build output the WiX compilation log if it failed.
Before it was not outputting it not at all because the build output is an array that was piped directly to 'Write-Verbose' instead of converting it to a string using 'Out-String'
Because the WiX log is usually quite verbose (around 250 lines), the log is only shown if there must have been a compilation error due to the missing MSI

* PR 4831: Use -Verbose option on Write-Verbose to force output in build as suggested in review.
2017-09-14 14:12:51 -07:00
James Truher [MSFT] a9db9ba482 Skip Certificate Authentication tests on CentOS and Mac (#4822)
These two tests have been failing on CentOS for some time. It is because the available libcurl library does not support client authentication certificates
2017-09-14 10:52:35 -07:00
Dongbo Wang ede580e7d1 Improve the guideline for perf consideration (#4824)
* Improve the guideline for perf consideration

* Address comment
2017-09-14 09:24:49 +04:00
Mark Kraus 303a83546b Replace httpbin.org/user-agent with WebListener (#4798)
* Replace httpbin.org/user-agent with WebListener

* [feature] -SkipCertificateCheck To avoid cert issue

* [Feature] Rebase & Rerun CI

Rerun count: II
2017-09-14 09:23:29 +04:00
Mark Kraus 869cdf9ba4 Replace httpbin.org/headers with WebListener Get (#4799)
* Replace httpbin.org/headers with WebListener Get

* [feature] -SkipCertificateCheck to avoid Cert issue

* [Feature] Rebase & Rerun CI
2017-09-14 09:22:52 +04:00
Dongbo Wang 6703014b32 Merge beta.7 release branch to master 2017-09-13 17:24:02 -07:00
Dongbo Wang 6bf0ead8d6 Update windows package names 2017-09-13 16:37:43 -07:00
Travis Plunk ea7c2bddbe Update travis-ci script so that PRs can fail due to pester tests (#4830)
* Add a switch to force tests to fail for testing CI system to Start-PSPester
* [includeFailingTest] Add commit tag to force tests to fail for testing CI system
2017-09-13 14:14:08 -07:00
Steve Lee 5fedd9c54f added tests for start/stop/suspend/resume/restart service cmdlets (#4774) 2017-09-13 10:24:04 -07:00
Steve Lee 4ad313aafb Add tests for Get-Module over remoting (#4787)
Some additional tests that are remoting specific based on code coverage
2017-09-12 17:12:52 -07:00
Mike Richmond d2fe36fb41 6.0.0-beta.7 Change Log (#4821) 2017-09-12 17:10:25 -07:00
Dongbo Wang a86e608c8b Update docs for beta.7 release 2017-09-12 15:08:49 -07:00
Dongbo Wang c06ffc4a5c Add a generic file watcher function in HelpersCommon.psm1 (#4775)
Add a generic file watcher function in HelpersCommon.psm1 and update some tests to use the `Wait-FileToBePresent`.
2017-09-12 13:05:47 -07:00
Dan Travison 6a78e303ff Mitigate intermittent failures in access denied tests. (#4788)
This change mitigates intermittent timeout failures in the access denied tests as well as fixes unintended cross-test dependencies. If PowerShell takes longer that 10 seconds to complete a race can cause the subsequent test to pick up the output file of the previous test and fail (i.e., the expected output error file already exists from the previous test because it was created by the long running PowerShell process after the second test started.) Worse case, the failure cascades causing the race to propagate through the remaining tests in the set.

The fix is two fold:
1: Increase the timeout for waiting for the launched powershell process. (mitigation)
2: Ensure each uses a unique name for the error and done files to avoid polluting the next test.
2017-09-12 11:01:32 -07:00
Mark Kraus fd3a003765 Add Multipart Support to Web Cmdlets (#4782)
Partially implements  #2112
- Adds `System.Net.Http.MultipartFormDataContent` as a possible type for `-Body`
- Adds `/Multipart/` test to WebListener 

This allows for the user to create their own `Http.MultipartFormDataContent` object and submit it. Since `multipart/form-data` submissions are highly flexible, adding direct support for it to the CmdLets may over-complicate the command parameters and a limited implementation would not address the broad scope of use cases. This at least allows the user to submit multipart forms using the Web Cmdlets and not have to manage their own `HttpClient`. Once this is introduced, limited multipart implementations can be expanded to use the code in this PR.
2017-09-12 09:41:36 -07:00
Steve Lee 1e4cbe15ff Added tests for get-service based on code coverage analysis (#4773)
* reformated test cases

* added whitespace to format the test cases
2017-09-12 08:48:37 +04:00
Paul Higinbotham f95b8aca86 [Regression] Fix for error on Enter-PSSession exit (#4693)
* Fix for error on Enter-PSSession exit

* Added comments per code review feedback

* Updated comment
2017-09-11 17:49:28 -07:00
Steve Lee 6b684bb7dd The PSSessionConfiguration tests were putting many repeated warning messages into the log, changed warnings to be silent (#4794) 2017-09-11 17:45:21 -07:00
Travis Plunk fb60c47a1e Fix travis-ci script so that PRs can fail due to pester tests (#4807) 2017-09-11 15:24:09 -07:00
Dongbo Wang ad0b4cc54b Add tests for ProxyCommand APIs to improve coverage (#4791)
Examine the code in ProxyCommand.cs to find out specific missing areas.
2017-09-11 14:06:32 -07:00
Travis Plunk a3e193a6b3 Add tests for 'New-Object -ComObject' (#4776) 2017-09-11 12:53:34 -07:00
Steve Lee 3815a95242 validate the expected output package exists (#4795) 2017-09-11 12:36:24 -07:00
Steve Lee 625717493b added tests for test-wsman (#4771) 2017-09-11 12:31:08 -07:00
Littlejohn bbc180a918 Added Meta, Charset, and Transitional parameters to ConvertTo-HTML (#4184) 2017-09-11 12:22:10 -07:00
Steve Lee 6f1c7a05c6 Enable cross compiling for raspberry-pi arm32 (#4742) 2017-09-11 12:16:58 -07:00
Dongbo Wang 0dc575dbf6 Disable a failing test case in AppVeyor daily run (#4806) 2017-09-11 10:54:57 -07:00
Dongbo Wang db33d90479 First round of workflow cleanup (#4777)
This round of cleanup focuses on the following areas
- Tab completion code
- InitialSessionState
- Compiler/MiscOps
- Utils/SessionStateFunctionAPIs
Changes in the rest affected files are mainly some corresponding changes due to the cleanup work in the above areas.
2017-09-11 08:55:13 -07:00
Dongbo Wang b2fa0ee522 Add tests for StaticParameter to improve coverage (#4779) 2017-09-11 08:54:35 -07:00
Steve Lee 2761c3ff21 Increase Set-Service and New-Service test coverage (#4785)
* reformatted file to be consistent

* manual fix formatting
2017-09-09 20:19:16 +04:00
Dongbo Wang ca1d2acfba Update coding guidelines (#4754)
* Update coding guidelines to make it more concrete and useful in a review process.

* Add a section about security

* Address comments

* Update .spelling

* Address more comments

* Address comment about the security section

* Fix 'i.e.' and 'e.g.'

* Update .spelling

* One more tweak

* Add motivation for using 'nameof'
2017-09-08 20:24:26 +04:00
Ilya fc9d798b77 Enable use 'Singleline,Multiline' option in split operator (#4721)
Fix #4712
2017-09-08 09:23:38 -07:00
Sarith Sutha f4b075c856 Add -WhatIf switch to Start-Process cmdlet (#4735)
* Add -WhatIf switch to Start-Process cmdlet
* Add test for the -WhatIf switch 

* Added a test to ensure that using a whatif switch prevents the action from being performed.

* Incorporated code review comments

* merged two tests into one as suggested

* Included the error action at the end of the cmdlet

* Remove extra space before `StringUtil` and new line

* Renamed the resource string id ProcessStartInfo to StartProcessTarget
2017-09-08 09:18:13 +04:00
Mark Kraus f41461825a Replace httpbin.org/get tests With WebListener (#4738)
* Adds the /Get/ functionality to Weblistener
* Replaces the tests that rely on httpbin.org/get with WebListener


* [Feature] Move HttpBin/Get Tests to WebListener

* [Feature] update .spelling

* [Feature] Address PR Feedback

* [Feature] Add and document Home & /

* Readme Update

* [Feature] Should Match -> Should Be

Rerun CI

* [Feature] Rebase and Rerun CI
2017-09-08 07:53:04 +04:00
Ilya 3c597367ba Replace 'Windows PowerShell' with 'PowerShell' in resx files (#4758)
Replace 'Windows PowerShell' with 'PowerShell' in '.resx' files where appropriate.
2017-09-07 12:33:56 -07:00
Steve Lee 7c9b188c13 Rename $IsOSX to $IsMacOS (#4757) 2017-09-07 10:34:40 -07:00
James Truher [MSFT] ee0bb15b71 Make it easier to view and compare code coverage for a file (#4764) 2017-09-06 17:11:50 -07:00
Ilya e588a18c76 Refactor MSBuild project files to get PowerShell version from git tag (#4182)
Extract information about the release tag, number of commits since the tag and the hash of the latest commit within a MSBuild target, and bake that information into version properties of the assemblies appropriately.
2017-09-06 15:20:25 -07:00
Dan Travison 7faf76b9c9 Disable test "Test 01. Standard Property test - all properties (<property>)" due to missing CsPhysicallyInstalledMemory (#4763) 2017-09-06 15:14:40 -07:00
Dongbo Wang 41f12b1d2c Push locals of automatic variables to 'DottedScopes' when dotting script cmdlets (#4709)
When dotting a script cmdlet, the locals of automatic variables from the `PSScriptCmdlet` is not set up in the current scope before parameter binding. The fix is to push the locals in `CommandProcessor.OnSetCurrentScope` and pop them in `CommandProcessor.OnRestorePreviousScope`, which will be called from `SetCurrentScopeToExecutionScope` and `RestorePreviousScope` respectively.

Summary of changes:
1. When a new local scope is used, currently we set the locals for `CommandProcessor` right before parameter binding (in `BindCommandLineParametersNoValidation`); we set the locals for `ScriptCommandProcessor` in `Prepare`. I moved both to the constructor, right after the new scope is created so that the code is more consistent.

2. In `CmdletParameterBinderController.cs`, we set up the `PSBoundParameters` and `MyInvocation` variables in `HandleCommandLineDynamicParameters` again, which I think is unnecessary because this method is only called from `BindCommandLineParametersNoValidation`, where the setup is done for the first time.

3. Currently, the locals will be set for dotted script cmdlet in `EnterScope()` and `ExitScope()`. Now, that logic is moved to `OnSetCurrentScope` and `OnRestorePreviousScope` of `CommandProcessor`. This not only makes sure that locals are set before parameter binding, but also is consistent with the `ScriptCommandProcessor`.
2017-09-06 10:25:33 -07:00
Travis Plunk 955e01dc65 update opensuse docker image to 42.2 (#4737)
- fix missing dependency in amazonlinux dockerfile
- change opensuse docker to use supported image
- update to conform withe label-schema.org
2017-09-05 15:36:29 -07:00
James Truher [MSFT] 5d0a1c1a7f get tests to display the same number of tests regardless of platform (#4728)
* Make count of tests the same between Windows and Non-Windows platforms

Change logic so test cases are created for all platforms, but only load the helper module on windows

* Ensure Get-ComputerInfo tests run the same number of tests regardless of platform
2017-09-05 11:17:57 -07:00
James Truher [MSFT] cfb2913a29 Modify travis build to upload a daily build based on platform (#4689)
change README.md to view a platform specific badge
2017-09-05 11:11:47 -07:00
Dongbo Wang 5f60058c22 Update using-vscode.md (#4736)
The setting 'powershell.developer.powerShellExePath' is deprecated and should be changed to 'powershell.powerShellExePath'.
2017-09-05 09:21:30 -07:00
Steve Lee fb286e6cf8 Removed double spaces from .cs and .ps1 files (#4743) 2017-09-04 19:45:51 -07:00
Steve Lee efa320cdf8 Update docs about the pull-request-process (#4710)
Update pull-request-process to clarify role/responsibility of author and reviewers based on recent feedback from team and community. Also moved it to `.github/CONTRIBUTING.md` so that all related information can be found at one place.
2017-09-04 10:29:20 -07:00
Ilya fb67072479 Fix error message in ValidateSetAttribute ValidateElement() (#4722) 2017-09-04 09:11:47 -07:00
Kory Gill c14648e7a8 Remove double spaces between words in resx files (#4741) 2017-09-03 20:48:08 +04:00
Steve Lee 2f34009328 added new approved Build and Deploy verbs (#4725)
- Added Build and Deploy verbs, updated suggestions
- Reorganized verbs to be in alphabetical order making it easier to compare against https://msdn.microsoft.com/en-us/library/ms714428(VS.85).aspx
2017-09-01 17:41:07 -07:00
Michael Klement 803395b959 Fix for Get-Content -Delimiter including the delimiter in the array elements returned (#3706) - formatting changes 2017-09-01 13:01:43 -07:00