Commit graph

5210 commits

Author SHA1 Message Date
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
Michael Klement 1de749fbaa Fix for Get-Content -Delimiter including the delimiter in the array elements returned (#3706) - functional changes 2017-09-01 13:01:43 -07:00
Chunqing Chen 87e1d55f45 Set Redist test pending to unblock daily build failure (#4729) 2017-09-01 11:53:17 -07:00
Ilya 58a296ed49 Ensure GetNetworkCredential() returns null if PSCredential has null or empty user name (#4697)
* GetNetworkCredential() returns null if PSCredential has empty user name

* Fix test
2017-09-01 11:50:15 -07:00
Mark Kraus 87db370a59 Move WebCmdlets HTTPS tests to WebListener (#4733)
* Move HTTPS tests to WebListener

* Move Invoke-WebRequest HTTPS Tests to Context

* [Feature] Move Invoke-RestMethod HTTPS Tests to Context

.

* [feature] Address PR Feedback

* [feature] Mark Cert Auth Tests Pending

-skip -> -pending
2017-09-01 22:31:15 +04:00
Andrew deaa7c9375 Trace-Command tests for code coverage (#4288)
Added tests for Trace-Command that increase code coverage to 80%~85% per class.
2017-09-01 09:08:17 -07:00
Chuck Lu fab00865e8 Add absolute url for md in issue template and pull request template (#4718) 2017-09-01 09:04:37 -07:00
Dongbo Wang 795de73d31 Fix 'using module' when module has non-terminating errors handled with 'SilentlyContinue' (#4711)
`Compiler.LoadModule` assumes that when `ps.HadErrors == true` the error stream is not empty. However, when `SilentlyContinue` is specified as the error action, the non-terminating error is not kept in `ErrorOutputPipe` of the cmdlet and thus does not appear in `ps.Streams.Error`. So when `ps.HadErrors == true` while `ps.Streams.Error` is empty, it suggests it's OK to ignore the errors because they are explicitly suppressed with `SilentlyContinue` error action.

So in my opinion, the expected behavior of `"using module .\mod.psm1"` in this case should be successful as if `ps.HaddErrors` is false.
2017-09-01 08:54:08 -07:00
James Truher [MSFT] e0b7c23384 Report the same number of tests when run by Travis via cron (#4731) 2017-08-31 15:03:20 -07:00
Dan Travison 96a90f8985 Add explicit ContentType detection to Invoke-RestMethod (#4692)
This change removes the call to `ContentHelper.GetEncoding` since it's logic for returning a default encoding when a ContentType header is not found disables subsequent checks for meta charset definitions.
All variations of the Invoke-WebRequest tests have been mirrored for Invoke-RestMethod. Verbose output is used to verify the encoding since Invoke-RestMethod returns the JSON content directly instead of a response object. (See ExecuteRestMethod)
2017-08-31 10:47:54 -07:00
Mark Kraus 3b2d169c5e Add test WebListener module and tests for Web Cmdlet Certificate Authentication (#4622)
Introduce new test module 'WebListener.psm1'.
Now web HTTPS tests can use it to exclude using external sites.

PowerShell/PowerShell#4609

* [Feature] Add Tests for Web Cmdlet Certificate Authentication

PowerShell/PowerShell#4609

* [feature] Add new app to Publish-PSTestTools refactor tests

also add ASP.NET to .spelling

* [feature] spelling fix

* [feature] revert badssl changes

* [feature] Impliment suggestions

* [feature] Spelling, var rename, port 8443 to 8083

rebase fix conflict

* [feature] Rename to HttpsListener and Module-ize

.

* [feature] password protect ClientCert to fix macOS import issue

* [feature] Rename to WebListener 

* Rename HttpsListener to WebListener
* Switch Listener from Razor pages to MVC
* Address PR feedback
* Adjust tests

* [feature] Address PR feedback

* [feature] Replace missing smeicolons

* [feature] Address PR Feedback

* [feature] Cleanup and minor fix

* Enum was not used
* GetStatus() was not accessing the correct property chain
* Added -Test param to make URL generation smoother in test code and to fix double / issues

* [feature] More minor fixes

* Https when it matters.
* Expand property... not exclude..
* Remove superfluous and outdated ToString() override

* [Feature] Move ClientCeret.pfx to WebListener Module

* Move the cert
* Adjust Get-WebListenerClientCertificate 
* Remove cert from csproj
* ActionResult -> JsonResult (was mistakenly left as ActionResult during testing)..

* [Feature] Move ServerCert.pfx to Module

* Move cert
* Upate csproj
* Update module
* Add/Update README.md's

CI Retest.
2017-08-31 13:30:35 +04:00
Travis Plunk bd42fe95b4 change the default windows RID to win7-<arch> (#4701) 2017-08-29 17:21:50 -07:00
Steve Lee dc399a121b clean up coreclr/fullclr statements in tracesource (#4684) 2017-08-29 09:09:24 -07:00
Aditya Patwardhan fd047a8250 Creates a single package for Windows (#4540)
The updates to build.psm1 and packaging.psm1 create a single package (per bitness), which works on all the Windows OS versions, namely Windows 7 / Windows Server 2008 R2, Windows 8.1 / Windows Server 2012 R2, Windows 10 / Windows Server 2016.
2017-08-28 16:10:03 -07:00
Steve Lee deb8c4485d Remove alternate file stream code from non-Windows (#4567)
* AlternateStreams support relies on pinvoke to win32 APIs which don't work on non-Windows and produces errors about not loading a DLL in the case of copy-item
* Address PR feedback, remove -Stream parameter for Unix added new -stream tests
* if/def out alternate stream syntax checks not applicable to Unix
2017-08-28 15:39:42 -07:00
Chunqing Chen fe51fb7f60 Make 'Test-ModuleManifest' not load unnecessary modules (#4541) 2017-08-28 15:36:46 -07:00
Dongbo Wang 12002e7f2d Use stricter rule to unwrap a PSObject that wraps a COM object (#4614)
GetMember/SetMember/InvokeMember operations on a COM object will generate code to unwrap the COM object if it's wrapped in PSObject. Due to a loose restriction, if you have a string wrapped to a PSObject with an ETS member of the same name, then the string PSObject will be unwrapped too and the ETS member will be lost. The fix is to use a more restricted rule by checking if the base object is a COM object.
2017-08-28 13:19:02 -07:00
Travis Plunk 6a68838730 For reliability, start using pester PassThru object to verify tests passed (#4644)
* Add ability to verify a test run using the `-passthru` object from pester
* update travis-ci to use `-passthru` object to verify test results
* Address PR feedback
* call show-pspestererror with a named parameter
2017-08-26 08:26:06 -07:00
Mike Richmond c21906667f Disable 'VC++ Redist' test and run 'Windows Installer' test only on Windows (#4673) 2017-08-25 13:36:13 -07:00
Steve Lee 1e0acfac5e removed appending WindowsPowerShell PSModulePath (#4656) 2017-08-25 11:05:23 -07:00
Stellios W 7f79eadbdd Correct linux.md macOS brew reinstall command (#4627)
Correct linux.md macOS brew reinstall command
2017-08-25 11:02:48 -07:00
Dongbo Wang a65d1f743c Merge beta.6 release branch 2017-08-25 10:22:42 -07:00
Steve Lee 23f91c0236 Update WritingPesterTests.md to reflect recommended use of ShouldBeErrorId
* added spelling word

* added sample to inspect details of the errorrecord
2017-08-25 07:24:49 +04:00
Mike Richmond d5521beb18 Remove VCRedist check because it ignores the files installed via KB (#4664) 2017-08-24 15:42:10 -07:00
Travis Plunk a21b13222b Update ChangeLog for beta.6 release (#4654) 2017-08-24 13:02:11 -07:00
Dongbo Wang 80e02bda60 Update docs and scripts for beta.6 release (#4660) 2017-08-24 12:43:31 -07:00
Dongbo Wang cfe173ac0e Replace extension method 'IsComObject(this Type)' with Type.IsCOMObject (#4646) 2017-08-22 17:44:48 -07:00
Mark Kraus 5941b894ab Mark Multiple Response Header Test Pending (#4640) 2017-08-22 14:27:47 -07:00
Darwin ece7b44de3 Update install scripts with minor fixes targeting macOS
Fixes #4617
Fixes #4511
Change VS code install to use cask
Change OSX to use curl
Update version number by point release.
2017-08-22 12:10:00 -07:00
Ilya cdbbb7a4bb Minor formatting commits for Build.psm1 and csproj files (#4630) 2017-08-21 15:23:52 -07:00
Mark Kraus 297bba3fa1 Add support for Content Headers to BasicHtmlWebResponseObject and HtmlWebResponseObject (#4494) 2017-08-21 10:48:25 -07:00
Mark Kraus 1b23a62ae1 [Feature] Add Certificate Authentication Support for WebCmdlets (#4546)
* [Feature] Add Certificate Authentication Support for WebCmdlets

PowerShell/PowerShell#4544

* Add Certificate  Comments

* Set Certificate Options

* [feature] Post-rebase White-space correction

* [feature] mark certauth tests pending
2017-08-18 13:56:31 -07:00
bergmeister 54e892ab06 Make MSI installer perform pre-requisite checks (#4602)
* #4458 MSI installer checks that the Windows C Runtime and VS Studio 2015 C++ redistributables are present and returns error message if not.
Includes tests to check that the Wix file contains the download URLs and those URLs are not dead.
2017-08-18 12:47:43 -07:00
James Truher [MSFT] f6208f3c42 Add File Coverage to coverage data (#4556)
It is now possible to see the coverage based on the file and then format
the data so a report generator is not needed. You can map the files from
one location to another, so if you have a copy of the repo, but in a different
location, you can still format the output in a way so it may be studied
2017-08-17 13:39:23 -07:00
Dongbo Wang befc5f8ae1 Make PowerShell Core enumerate COM collections (#4553)
Make PowerShell Core enumerate COM collections
2017-08-17 20:23:36 +04:00
Ilya 45d1d20500 Merge pull request #4573 from SteveL-MSFT/console-no
* Make invalid arg to -File consistent with -Command
Improve error message if ambiguous arg is passed to -File

* Update powershell console exit codes to match Unix standards

* Enable -WindowStyle to work
2017-08-17 07:34:02 +04:00
Dongbo Wang c47ebea9ec Remove workflow related modules (#4581) 2017-08-16 17:36:05 -07:00
Dongbo Wang 580fb7baf5 Remove src\Microsoft.PowerShell.Activities (#4582) 2017-08-16 17:35:36 -07:00
Dongbo Wang 55fe5263e4 Remove src\Microsoft.PowerShell.Core.Activities (#4583) 2017-08-16 17:35:24 -07:00
Dongbo Wang d75065c874 Remove src\Microsoft.PowerShell.Diagnostics.Activities (#4584) 2017-08-16 17:35:10 -07:00
Dongbo Wang f04f665ac3 Remove src\Microsoft.PowerShell.GraphicalHost (#4585) 2017-08-16 17:34:55 -07:00
Dongbo Wang e687cab952 Remove src\Microsoft.PowerShell.Management.Activities (#4586) 2017-08-16 17:34:44 -07:00
Dongbo Wang ddef0690f2 Remove src\Microsoft.PowerShell.Security.Activities (#4587) 2017-08-16 17:34:28 -07:00
Dongbo Wang 176a22ce7f Remove src\Microsoft.PowerShell.Utility.Activities (#4588) 2017-08-16 17:34:14 -07:00
Dongbo Wang 1605a98d75 Remove src\Microsoft.PowerShell.Workflow.ServiceCore (#4589) 2017-08-16 17:34:03 -07:00
Dongbo Wang 33adef28f9 Remove src\Microsoft.WSMan.Management.Activities (#4590) 2017-08-16 17:33:29 -07:00
Dongbo Wang b3e7fd374f Move to the official .NET Core 2.0 (#4603)
* Migrate to official .NET Core 2.0

* [Feature] Remove chmod code as the issue has been fixed in dotnet
2017-08-16 17:32:46 -07:00